irma 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. irma-1.0.0/CHANGELOG.md +40 -0
  2. irma-1.0.0/CITATION.cff +35 -0
  3. irma-1.0.0/CONTRIBUTING.md +81 -0
  4. irma-1.0.0/INSTALL.md +162 -0
  5. irma-1.0.0/LICENSE +30 -0
  6. irma-1.0.0/LICENSES/Apache-2.0.txt +202 -0
  7. irma-1.0.0/MANIFEST.in +28 -0
  8. irma-1.0.0/PKG-INFO +584 -0
  9. irma-1.0.0/README.md +550 -0
  10. irma-1.0.0/THIRD_PARTY_NOTICES.md +101 -0
  11. irma-1.0.0/examples/README.md +43 -0
  12. irma-1.0.0/examples/lln_low_temperature_demo.py +86 -0
  13. irma-1.0.0/examples/mlip/MgO.cif +24 -0
  14. irma-1.0.0/examples/mlip/README.md +88 -0
  15. irma-1.0.0/examples/spectra/README.md +57 -0
  16. irma-1.0.0/examples/spectra/data/graphite_C_dos.txt +426 -0
  17. irma-1.0.0/examples/spectra/graphite_arcs_map.yaml +32 -0
  18. irma-1.0.0/examples/spectra/graphite_direct_qcuts.yaml +42 -0
  19. irma-1.0.0/examples/spectra/graphite_mode0_dosfile.yaml +35 -0
  20. irma-1.0.0/examples/spectra/graphite_mode0_phonopy.yaml +31 -0
  21. irma-1.0.0/examples/spectra/graphite_mode2_vision.yaml +30 -0
  22. irma-1.0.0/examples/tsl/README.md +113 -0
  23. irma-1.0.0/examples/tsl/be_iel10_extinction.input +182 -0
  24. irma-1.0.0/examples/tsl/graphite_iel10_classic.input +220 -0
  25. irma-1.0.0/examples/tsl/graphite_mode2.input +146 -0
  26. irma-1.0.0/irma/__init__.py +66 -0
  27. irma-1.0.0/irma/__main__.py +7 -0
  28. irma-1.0.0/irma/cli.py +198 -0
  29. irma-1.0.0/irma/core/__init__.py +1 -0
  30. irma-1.0.0/irma/core/constants.py +88 -0
  31. irma-1.0.0/irma/core/crystal.py +915 -0
  32. irma-1.0.0/irma/core/crystal_cards.py +745 -0
  33. irma-1.0.0/irma/core/crystal_input.py +137 -0
  34. irma-1.0.0/irma/core/deck.py +583 -0
  35. irma-1.0.0/irma/core/driver.py +761 -0
  36. irma-1.0.0/irma/core/elastic_dw.py +251 -0
  37. irma-1.0.0/irma/core/elastic_extinction.py +369 -0
  38. irma-1.0.0/irma/core/endf_writer.py +1536 -0
  39. irma-1.0.0/irma/core/engine.py +102 -0
  40. irma-1.0.0/irma/core/extinction.py +456 -0
  41. irma-1.0.0/irma/core/grids.py +410 -0
  42. irma-1.0.0/irma/core/incoherent_dw.py +252 -0
  43. irma-1.0.0/irma/core/kernels.py +1624 -0
  44. irma-1.0.0/irma/core/noncubic_engine.py +2149 -0
  45. irma-1.0.0/irma/core/noncubic_helpers.py +265 -0
  46. irma-1.0.0/irma/core/noncubic_inelastic.py +70 -0
  47. irma-1.0.0/irma/core/noncubic_inelastic_context.py +648 -0
  48. irma-1.0.0/irma/core/noncubic_numerics.py +329 -0
  49. irma-1.0.0/irma/core/noncubic_workers.py +1542 -0
  50. irma-1.0.0/irma/core/nuclear_data.py +760 -0
  51. irma-1.0.0/irma/core/phonopy_io.py +1082 -0
  52. irma-1.0.0/irma/core/sab_grids.py +98 -0
  53. irma-1.0.0/irma/core/standalone_sab.py +458 -0
  54. irma-1.0.0/irma/gui/__init__.py +1 -0
  55. irma-1.0.0/irma/gui/app.py +235 -0
  56. irma-1.0.0/irma/gui/deck_text.py +540 -0
  57. irma-1.0.0/irma/gui/element_table.py +540 -0
  58. irma-1.0.0/irma/gui/endf_form.py +3404 -0
  59. irma-1.0.0/irma/gui/grid_form.py +357 -0
  60. irma-1.0.0/irma/gui/mlip_panel.py +1166 -0
  61. irma-1.0.0/irma/gui/ncrystal_panel.py +627 -0
  62. irma-1.0.0/irma/gui/ns_panel.py +1952 -0
  63. irma-1.0.0/irma/gui/runner.py +318 -0
  64. irma-1.0.0/irma/gui/widgets.py +415 -0
  65. irma-1.0.0/irma/mlip/__init__.py +6 -0
  66. irma-1.0.0/irma/mlip/bundle.py +609 -0
  67. irma-1.0.0/irma/mlip/calculators.py +856 -0
  68. irma-1.0.0/irma/mlip/cli.py +626 -0
  69. irma-1.0.0/irma/mlip/emit.py +935 -0
  70. irma-1.0.0/irma/mlip/envs.py +614 -0
  71. irma-1.0.0/irma/mlip/force_server.py +173 -0
  72. irma-1.0.0/irma/mlip/phonons.py +348 -0
  73. irma-1.0.0/irma/mlip/relax.py +257 -0
  74. irma-1.0.0/irma/ncrystal/__init__.py +55 -0
  75. irma-1.0.0/irma/ncrystal/__main__.py +90 -0
  76. irma-1.0.0/irma/ncrystal/build.py +670 -0
  77. irma-1.0.0/irma/ncrystal/config.py +449 -0
  78. irma-1.0.0/irma/ncrystal/convert.py +161 -0
  79. irma-1.0.0/irma/ncrystal/ncmat.py +132 -0
  80. irma-1.0.0/irma/ncrystal/pack.py +404 -0
  81. irma-1.0.0/irma/ncrystal/provenance.py +123 -0
  82. irma-1.0.0/irma/spectra/__init__.py +67 -0
  83. irma-1.0.0/irma/spectra/__main__.py +7 -0
  84. irma-1.0.0/irma/spectra/chopper_resolution.py +646 -0
  85. irma-1.0.0/irma/spectra/cli.py +751 -0
  86. irma-1.0.0/irma/spectra/config.py +1105 -0
  87. irma-1.0.0/irma/spectra/dos_from_phonopy.py +83 -0
  88. irma-1.0.0/irma/spectra/dos_io.py +117 -0
  89. irma-1.0.0/irma/spectra/dos_mode0.py +412 -0
  90. irma-1.0.0/irma/spectra/elastic.py +937 -0
  91. irma-1.0.0/irma/spectra/forward.py +1091 -0
  92. irma-1.0.0/irma/spectra/instruments.py +281 -0
  93. irma-1.0.0/irma/spectra/sqe.py +544 -0
  94. irma-1.0.0/irma.egg-info/PKG-INFO +584 -0
  95. irma-1.0.0/irma.egg-info/SOURCES.txt +110 -0
  96. irma-1.0.0/irma.egg-info/dependency_links.txt +1 -0
  97. irma-1.0.0/irma.egg-info/entry_points.txt +5 -0
  98. irma-1.0.0/irma.egg-info/requires.txt +15 -0
  99. irma-1.0.0/irma.egg-info/top_level.txt +1 -0
  100. irma-1.0.0/pyproject.toml +115 -0
  101. irma-1.0.0/setup.cfg +4 -0
  102. irma-1.0.0/tests/mode2_euphonic_n1_validation/graphite/FORCE_CONSTANTS +2305 -0
  103. irma-1.0.0/tests/mode2_euphonic_n1_validation/graphite/phonopy.yaml +662 -0
  104. irma-1.0.0/tests/native_LEAPR_NJOY_ENDF_validation/leapr_decks/tsl-013_Al_027.input +60 -0
  105. irma-1.0.0/tests/native_LEAPR_NJOY_ENDF_validation/leapr_decks/tsl-026_Fe_056.input +60 -0
  106. irma-1.0.0/tests/native_LEAPR_NJOY_ENDF_validation/leapr_decks/tsl-BeO.input +120 -0
  107. irma-1.0.0/tests/native_LEAPR_NJOY_ENDF_validation/leapr_decks/tsl-HinCH2.input +268 -0
  108. irma-1.0.0/tests/native_LEAPR_NJOY_ENDF_validation/leapr_decks/tsl-crystalline-graphite.input +216 -0
  109. irma-1.0.0/tests/native_LEAPR_NJOY_ENDF_validation/leapr_decks/tsl-l-CH4.input +58 -0
  110. irma-1.0.0/tests/native_LEAPR_NJOY_ENDF_validation/leapr_decks/tsl-ortho-H.input +2300 -0
  111. irma-1.0.0/tests/native_LEAPR_NJOY_ENDF_validation/leapr_decks/tsl-para-H.input +2300 -0
  112. irma-1.0.0/tests/native_LEAPR_NJOY_ENDF_validation/leapr_to_irma_input.py +145 -0
@@ -0,0 +1,40 @@
1
+ # Changelog
2
+
3
+ Notable changes to IRMA. Format follows [Keep a Changelog](https://keepachangelog.com/);
4
+ versions follow [Semantic Versioning](https://semver.org/).
5
+
6
+ ## [1.0.0] — 2026-08-03
7
+
8
+ Initial public release. IRMA turns one phonon model into three
9
+ outputs on one engine:
10
+
11
+ - **ENDF-6 File 7 evaluations** from LEAPR-style decks: the classic
12
+ kernels (validated bit-for-bit against NJOY2016 reference tapes),
13
+ generalized coherent elastic for arbitrary crystals (`iel=10`,
14
+ SEF/MEF output conventions, Bragg-edge grouping, opt-in
15
+ crystalline extinction), and the phonopy-backed noncubic inelastic
16
+ modes with the exact coherent one-phonon term, anisotropic
17
+ Debye-Waller tensors, a per-species partition for polyatomic
18
+ materials, and automatic alpha/beta grids.
19
+ - **Instrument-resolved neutron spectra** (`irma spectra`):
20
+ indirect- and direct-geometry spectrometers, chopper resolution,
21
+ 2-D S(Q,E) maps, and a DOS-driven mode 0.
22
+ - **NCrystal transport exports** (`irma ncrystal`) sampled by the
23
+ companion `ncrystal_plugin_IRMA`, plus the standalone
24
+ `ncrystal_plugin_ENDFTSL` plugin for sampling ENDF TSL files
25
+ directly in NCrystal.
26
+
27
+ The **MLIP phonon front end** (`irma mlip`) builds the phonon model
28
+ itself from a bare crystal structure with one of nine pretrained
29
+ machine-learned interatomic potentials, and emits ready-to-edit
30
+ inputs for all three outputs (`--inelastic-mode 0|1|2`, mixed
31
+ elastic format by default).
32
+
33
+ A GUI (`python -m irma --gui`) drives every path. `examples/` maps
34
+ sixteen runnable examples to their calculation types; `skills/irma/`
35
+ ships an opt-in assistant skill for AI coding agents; the validation
36
+ record under `docs/validation/` documents the evidence behind the
37
+ physics (NJOY reference tapes, Euphonic and OCLIMAX cross-code
38
+ comparisons, and measured VISION, ARCS, and VENUS data).
39
+
40
+ The development history preceding this release is internal to ORNL.
@@ -0,0 +1,35 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use IRMA in your research, please cite it as below."
3
+ title: "IRMA — (In)elastic Representation of Materials As S(alpha,beta) evaluations"
4
+ abstract: >-
5
+ IRMA generates thermal neutron scattering law S(alpha, beta) libraries in
6
+ ENDF-6 format using the phonon expansion method, with generalized coherent
7
+ elastic for arbitrary crystals and phonopy-backed noncubic inelastic paths
8
+ carrying an exact coherent one-phonon term. The same phonon model also drives
9
+ a neutron-scattering forward model (powder S(Q,E) to instrument-resolved
10
+ spectra) and an exporter that writes scattering kernels for a companion
11
+ NCrystal plugin, for Monte Carlo transport. A front end builds the phonon
12
+ model from a crystal structure using pretrained machine-learned interatomic
13
+ potentials.
14
+ type: software
15
+ authors:
16
+ - family-names: Ramic
17
+ given-names: Kemal
18
+ email: ramick@ornl.gov
19
+ affiliation: "Oak Ridge National Laboratory"
20
+ orcid: "https://orcid.org/0000-0002-3495-9821"
21
+ version: "1.0.0"
22
+ date-released: "2026-08-03"
23
+ license:
24
+ - BSD-3-Clause
25
+ - Apache-2.0
26
+ repository-code: "https://github.com/ramic-k/IRMA"
27
+ keywords:
28
+ - thermal neutron scattering
29
+ - "S(alpha,beta)"
30
+ - thermal scattering law
31
+ - ENDF
32
+ - LEAPR
33
+ - phonon
34
+ - inelastic neutron scattering
35
+ doi: "10.11578/dc.20260803.1"
@@ -0,0 +1,81 @@
1
+ # Contributing to IRMA
2
+
3
+ ## Development setup
4
+
5
+ ```bash
6
+ pip install -e ".[phonopy,spectra,mlip]" # matches what CI tests; phonopy only
7
+ # needed for inelastic_mode=1/2, spectra
8
+ # for the irma.spectra forward model,
9
+ # mlip for the irma.mlip front end
10
+ pip install -r requirements-dev.txt
11
+ ```
12
+
13
+ ## Tests
14
+
15
+ ```bash
16
+ python -m pytest # fast suite (~25 s, no phonopy/NJOY)
17
+ ```
18
+
19
+ CI (`.github/workflows/ci.yml`) runs the fast suite on every push and
20
+ pull request, across Linux/macOS/Windows and Python 3.11-3.13, plus the
21
+ two NCrystal plugin gates.
22
+ Keep it green; keep it fast — anything needing phonopy, NJOY, or more than a
23
+ few seconds belongs in the manual validation harnesses, not the fast suite.
24
+
25
+ The `irma.mlip` tests (`tests/mlip/`) follow the same rule with one twist:
26
+ they exercise the calculator factory through stubs and the displacement/dispatch
27
+ machinery through ASE's built-in EMT, so they need `ase`/`phonopy`/`PyYAML`
28
+ (the `[mlip]` extra) but no potential package and no network; without the
29
+ extra they skip cleanly. Tests that instantiate real potentials sit behind
30
+ the `mlip_real` marker and only run when you opt in with
31
+ `IRMA_MLIP_REAL_TESTS=1`.
32
+
33
+ ## Validation harnesses (manual, not CI)
34
+
35
+ - `tests/native_LEAPR_NJOY_ENDF_validation/` — IRMA must reproduce the
36
+ committed native LEAPR/NJOY reference tapes (7e-5 or better inelastic, exact
37
+ elastic structure). Run after touching the classic path, the writer, or
38
+ anything in the ENDF output chain.
39
+ - `tests/mode2_euphonic_n1_validation/` — the mode-2 exact one-phonon
40
+ S(α,β) vs the committed Euphonic reference. Run after touching the noncubic
41
+ engine. Regenerating the frozen reference requires `euphonic` and is only
42
+ needed if the vendored phonon models change.
43
+
44
+ ## Refactoring policy
45
+
46
+ Behavior-preserving changes to the physics chain are verified by
47
+ byte-identical output: build a baseline of representative decks covering
48
+ every affected code path (see the validation README for deck patterns —
49
+ classic, negative-temperature reuse, secondary scatterer, single-channel (SEF) / mixed (MEF) / grouped elastic, modes 1/2 with multiphonon and SCT), produce tapes before and
50
+ after, and `cmp` them. Single-process runs (`ncpu=1`) are deterministic and
51
+ byte-stable; use them for baselines.
52
+
53
+ For the noncubic modes 1/2 specifically, `tools/tape_gauge.py` is the
54
+ standing instrument: a fast 8³ iteration profile and a `--big` production
55
+ profile (graphite, 40³ mesh, standard sampling, the full automatic grids).
56
+ Run the baseline from a pristine worktree of the last blessed commit, the
57
+ candidate from the working tree, and `--diff` the two — it passes on
58
+ byte-identical tapes, or on parsed MF7/MT4 agreement within 1e-6 relative
59
+ (the ENDF write precision). Deliberate physics changes additionally need
60
+ their own quantification and a CHANGELOG record stating what moved and by
61
+ how much.
62
+
63
+ ## Conventions
64
+
65
+ - Three hard dependencies only (numpy, endf-parserpy, threadpoolctl).
66
+ phonopy stays an optional extra; do not add imports of it outside lazy,
67
+ mode-1/2-only paths. Anything heavier belongs in validation tooling, not
68
+ the package.
69
+ - Native BLAS/OpenMP threads are pinned to 1 by design (measured: threaded
70
+ BLAS inside the `ncpu` worker pool oversubscribes and is >10x slower).
71
+ Parallelism belongs to the Card 6f `ncpu` process pool, which uses the
72
+ spawn start method (Windows-compatible; a driver script calling IRMA at
73
+ module level therefore needs the standard `if __name__ == "__main__":`
74
+ guard). `IRMA_WORKER_THREADS` overrides the per-worker thread pin for
75
+ tuning experiments only — the default of 1 is the measured optimum.
76
+ - Input-format changes must keep the LEAPR-derived card structure and be
77
+ validated with friendly `DeckError` messages (card name, expected/found,
78
+ input line) — see `tests/test_deck_errors.py`.
79
+ - Comments document the code as it is — no exploratory narration, no
80
+ conversational asides. If a value or layout matches NJOY, cite the NJOY
81
+ routine it matches.
irma-1.0.0/INSTALL.md ADDED
@@ -0,0 +1,162 @@
1
+ # Installing IRMA
2
+
3
+ The full installation guide — including the optional pieces and what each
4
+ workflow needs — lives in the manual at
5
+ [`docs/installation.md`](docs/installation.md). This file is the short
6
+ version.
7
+
8
+ ## Prerequisites
9
+
10
+ - **Python 3.11 or later** — [Download Python](https://www.python.org/downloads/)
11
+ - **tkinter** — Required for the GUI. It is included with most Python
12
+ installations. If you get an `ImportError: No module named tkinter`, see
13
+ the [Tkinter installation notes](#tkinter) below.
14
+
15
+ ## Install
16
+
17
+ From the IRMA source directory, pick the form that covers your workflows:
18
+
19
+ ```bash
20
+ pip install -e . # core (classic LEAPR paths, iel=0-6 and iel=10 mode 0)
21
+ pip install -e ".[phonopy]" # + the noncubic inelastic paths (inelastic_mode=1/2)
22
+ pip install -e ".[spectra]" # + the neutron-scattering forward model (irma spectra)
23
+ pip install -e ".[mlip]" # + the MLIP phonon front end (irma mlip)
24
+ ```
25
+
26
+ The extras combine: `pip install -e ".[phonopy,spectra,mlip]"` covers
27
+ everything.
28
+ For a regular (non-editable) install, drop the `-e`. The required
29
+ dependencies (**numpy**, **endf-parserpy**, and **threadpoolctl**, at the
30
+ versions validated in `pyproject.toml`) are resolved automatically — there is
31
+ no separate dependency-install step.
32
+
33
+ What each extra unlocks:
34
+
35
+ | Extra | Adds | Needed for |
36
+ |-------|------|------------|
37
+ | `[phonopy]` | `phonopy` | `iel=10` with `inelastic_mode=1` or `2` (the phonopy-backed noncubic MT4 paths), and `irma.spectra` inelastic modes 1/2 or `dos_source: phonopy` |
38
+ | `[spectra]` | `scipy`, `PyYAML` | the `irma.spectra` forward model (`irma spectra` CLI and the GUI's **Neutron Scattering Experiments** tab) |
39
+ | `[mlip]` | `ase`, `phonopy`, `PyYAML` | the `irma.mlip` phonon front end (`irma mlip` CLI and the GUI's **MLIP phonon models** tab). The potential packages themselves are not included: their pins conflict with each other, so `irma mlip env create` installs each one into its own dedicated environment |
40
+
41
+ ### Dependency documentation
42
+
43
+ If you need help installing or configuring the dependencies:
44
+
45
+ | Package | Documentation |
46
+ |---------|---------------|
47
+ | numpy | [numpy.org/install](https://numpy.org/install/) |
48
+ | endf-parserpy | [github.com/IAEA-NDS/endf-parserpy](https://github.com/IAEA-NDS/endf-parserpy) |
49
+ | phonopy | [phonopy.github.io/phonopy/install.html](https://phonopy.github.io/phonopy/install.html) |
50
+
51
+ For the noncubic modes (`iel=10` with `inelastic_mode=1/2`), the deck also
52
+ needs the phonopy control cards (`Card 6f` and `Card 6g`):
53
+
54
+ - use `nspec=0` and omit Card `6e`
55
+ - keep the full crystal in Card `6d`, even for mixed materials
56
+ - keep one principal scatterer per deck; Card `5` chooses which atom gets the
57
+ exported MT4 law
58
+ - if you need separate mixed-material tapes for different principals
59
+ (for example Be and O in BeO), run IRMA once per principal
60
+
61
+ ## Verify the installation
62
+
63
+ ```bash
64
+ python -m irma --version
65
+ ```
66
+
67
+ This should print the IRMA version number.
68
+
69
+ ## Launching the GUI
70
+
71
+ There are two ways to launch the graphical interface:
72
+
73
+ ```bash
74
+ # Option 1: Module flag
75
+ python -m irma --gui
76
+
77
+ # Option 2: Installed entry point
78
+ irma-gui
79
+ ```
80
+
81
+ Both open the same GUI window. The GUI uses **tkinter**, which is part of
82
+ the Python standard library — no extra GUI framework is needed.
83
+
84
+ ## Running from the command line
85
+
86
+ ```bash
87
+ python -m irma input_file output_file
88
+ ```
89
+
90
+ Or using the installed entry point:
91
+
92
+ ```bash
93
+ irma input_file output_file
94
+ ```
95
+
96
+ With the `[spectra]` extra installed, the neutron-scattering forward model
97
+ is available as a subcommand:
98
+
99
+ ```bash
100
+ irma spectra --help
101
+ ```
102
+
103
+ With the `[mlip]` extra installed, the phonon front end is available the
104
+ same way:
105
+
106
+ ```bash
107
+ irma mlip --help
108
+ ```
109
+
110
+ ## Platform support
111
+
112
+ | Capability | Linux | macOS | Windows |
113
+ | --- | --- | --- | --- |
114
+ | ENDF/TSL evaluation (classic paths, `iel` 0-6/10 with `inelastic_mode=0`) | yes | yes | yes |
115
+ | Noncubic `inelastic_mode=1/2`, spectra forward model, NCrystal export | yes | yes | untested* |
116
+ | GUI | yes | yes | untested** |
117
+ | C++ NCrystal plugins (build) | yes (CI-gated) | yes | untested |
118
+
119
+ The noncubic worker pool uses the spawn start method with the compute
120
+ context in shared memory, so `ncpu > 1` (Card 6f) and `jobs > 1` are
121
+ implemented identically on all three platforms — but only Linux (CI) and
122
+ macOS (routine development) are TESTED. \*Windows support is untested
123
+ until a smoke test runs on real Windows hardware; treat `jobs > 1` /
124
+ `ncpu > 1` there as experimental. \**Additionally, cancelling a parallel
125
+ GUI run on Windows currently terminates only the immediate child process:
126
+ spawned workers can keep running until they finish their current work item
127
+ (no tree-aware kill is implemented yet). On Windows, prefer `jobs=1` for
128
+ GUI runs or be prepared to end stray worker processes manually.
129
+ One standard spawn requirement applies: a
130
+ script that drives IRMA programmatically must wrap its entry point in
131
+ `if __name__ == "__main__":` — the `irma` CLI and `python -m irma...`
132
+ entry points already do.
133
+
134
+ ## Tkinter
135
+
136
+ The GUI requires tkinter, which ships with most Python distributions. If
137
+ it is missing on your system:
138
+
139
+ - **macOS** — Install the official Python from
140
+ [python.org](https://www.python.org/downloads/). The Homebrew Python
141
+ (`brew install python`) may not include tkinter; if so, run
142
+ `brew install python-tk`.
143
+ - **Ubuntu/Debian** — `sudo apt install python3-tk`
144
+ - **Fedora** — `sudo dnf install python3-tkinter`
145
+ - **Arch Linux** — `sudo pacman -S tk`
146
+ - **Windows** — Tkinter is included by default with the standard Python
147
+ installer from python.org. Make sure the "tcl/tk and IDLE" option is
148
+ checked during installation.
149
+ - **Conda** — `conda install -c conda-forge tk`
150
+
151
+ ## Troubleshooting
152
+
153
+ **`ModuleNotFoundError: No module named 'irma'`**
154
+ Make sure you ran `pip install -e .` from the IRMA directory, and that
155
+ you are using the same Python environment.
156
+
157
+ **`ModuleNotFoundError: No module named 'tkinter'`**
158
+ See the [Tkinter](#tkinter) section above.
159
+
160
+ **GUI does not appear on macOS**
161
+ If you are using a virtual environment, make sure it was created with
162
+ access to the system tkinter. Try: `python -m venv --system-site-packages myenv`
irma-1.0.0/LICENSE ADDED
@@ -0,0 +1,30 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, Oak Ridge National Laboratory
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice,
10
+ this list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30
+ POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
irma-1.0.0/MANIFEST.in ADDED
@@ -0,0 +1,28 @@
1
+ # Deliberate sdist contents. Without this file, setuptools' legacy defaults
2
+ # shipped a broken half test-tree (tests/test_*.py without conftest.py or the
3
+ # ~33 MB of reference data they need) and omitted the project meta-docs.
4
+ # The sdist is library-only: the test suite and its reference tapes live in
5
+ # the repository. LICENSE and THIRD_PARTY_NOTICES.md are included via
6
+ # `license-files` in pyproject.toml.
7
+ prune tests
8
+ include LICENSES/Apache-2.0.txt
9
+ include CHANGELOG.md
10
+ include CITATION.cff
11
+ include INSTALL.md
12
+ include CONTRIBUTING.md
13
+ graft examples
14
+ # The shipped graphite examples (examples/tsl/graphite_mode2.input and the
15
+ # examples/spectra/*.yaml phonopy-backed configs) reference this vendored phonopy
16
+ # model + its companion force constants. Re-include just those two files after the
17
+ # `prune tests` above (MANIFEST is order-sensitive: a later `include` re-adds them)
18
+ # so the examples run from an unpacked sdist, not only from a repo checkout.
19
+ include tests/mode2_euphonic_n1_validation/graphite/phonopy.yaml
20
+ include tests/mode2_euphonic_n1_validation/graphite/FORCE_CONSTANTS
21
+ # The shipped READMEs (README.md "Worked examples" and examples/tsl/README.md)
22
+ # give runnable `python -m irma <deck> <out>` commands that point at these
23
+ # classic reference decks, so ship the decks themselves (~380 KB total). The
24
+ # multi-MB companions (NJOY .leapr job streams, reference .endf tapes) stay
25
+ # repository-only; the READMEs say so. leapr_to_irma_input.py is the converter
26
+ # both READMEs reference for turning an NJOY LEAPR deck into an IRMA deck.
27
+ include tests/native_LEAPR_NJOY_ENDF_validation/leapr_decks/*.input
28
+ include tests/native_LEAPR_NJOY_ENDF_validation/leapr_to_irma_input.py