Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ QuantUI/
│ ├── app_launcher.py ← `quantui run app` / `quantui view` Voilà launch
│ ├── app_viewer.py ← read-only viewer mode (History + Analysis only)
│ ├── app_workspace.py ← two-pane workspace: persistent viewer pane, view toolbar, atom list, status footer
│ ├── app_pane_views.py ← Populations / Vibrational / Isosurface panels show their 3D view in the pane (one viewer)
│ ├── app_a11y.py ← page script for menu ARIA roles + arrow keys, dialog focus, live status region, skip link
│ ├── app_menubar.py ← menu bar (File / Calculate / View / Results / Help); items call existing handlers
│ ├── app_setup_dialog.py ← modal dialog that moves calc_setup_panel in and back out
│ ├── app_slurm.py ← Cluster Jobs tab + SLURM result ingestion
Expand Down Expand Up @@ -411,7 +413,8 @@ bail out instead of overwriting newer output.

All 12 panels are **always in the DOM** (`layout.display=""`, `selected_index=None`).
Unavailable panels show a "Not available — run a X calculation first" placeholder.
`_activate_ana_panel()` swaps the placeholder for real content and expands the accordion.
`_activate_ana_panel()` swaps the placeholder for real content; only the primary
(first auto-selected) panel is expanded, the rest stay collapsed (UX-8).
`_deactivate_all_ana_panels()` restores placeholders and collapses — never hides.

Source of truth: `_PANEL_META` / `_PANEL_REGISTRY` in `app.py`.
Expand Down Expand Up @@ -603,7 +606,7 @@ __init__()
| `self.method_dd` | `widgets.Dropdown` | Selected QC method |
| `self.basis_dd` | `widgets.Dropdown` | Selected basis set |
| `self.calc_type_dd` | `widgets.Dropdown` | Calc type selector |
| `self.result_viz_output` | `widgets.Output` | 3D molecule rendered after every calc |
| `self.result_viz_output` | `widgets.Output` | Results-tab 3D molecule; only with the workspace off (the pane is the one viewer otherwise) |
| `self._last_result_dir` | `Optional[Path]` | Saved result directory from most recent run |

---
Expand Down Expand Up @@ -794,11 +797,14 @@ Everything incl. the app server and notebook smoke tests: `pip install -e ".[pys
| `QUANTUI_LOG_DIR` | `~/.quantui/logs` | Where perf_log and event_log live |
| `QUANTUI_FREQ_PARALLEL` | (unset / off) | When truthy (`1`, `true`, `yes`, `on`), fan out IR-intensity finite-difference SCFs across CPU worker processes. Same as the System Settings checkbox; **overrides** the saved setting when set. Reference SCF + Hessian still use gpu4pyscf when available. Requires ≥4 cores and ≥2 atoms. |
| `QUANTUI_SETTINGS_PATH` | `~/.quantui/settings.json` | User-preferences file (`user_settings.py`); override for tests |
| `QUANTUI_ISSUE_DIR` | (unset) | Instructor's folder for Report Issue submissions (`issue_tracker.report_issue` writes one JSON per report); the dialog then says "your instructor" sees it (DEC-035 item 8) |
| `QUANTUI_DISABLE_GPU` | (unset) | Force CPU even when gpu4pyscf and a device are present |
| `QUANTUI_CHECKPOINT_DIR` | `~/.quantui/checkpoints` | Interactive checkpoint/resume store |
| `QUANTUI_ENABLE_SLURM` | (unset / off) | Offer the SLURM batch backend (needs `sbatch`) |
| `QUANTUI_STAGING_DIR` | System Settings value, else `~/.quantui/staging` | SLURM job-folder root |
| `QUANTUI_SLURM_*` | see `apptainer/slurm/README.md` | Partition, GRES, limits, cooldowns for batch jobs |
| `QUANTUI_COURSE_METHODS` / `QUANTUI_COURSE_BASIS_SETS` | (unset = full lists) | Instructor course preset: comma-separated names the Method / Basis Set dropdowns are limited to (`course_preset.py`, `docs/course-preset.md`) |
| `QUANTUI_COURSE_PRESET` | (unset) | Path to a JSON course preset `{"name", "methods", "basis_sets"}`; the settings file's `course` section is the third source |

---

Expand Down
175 changes: 174 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,178 @@ and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.ht

## [Unreleased]

## [0.14.0] - 2026-12-05

### Added

- **Course preset for instructors.** An optional preset trims the Method and
Basis Set lists on the Calculate tab (e.g. only RHF and B3LYP with STO-3G
and 6-31G\*). Set it with `QUANTUI_COURSE_METHODS` /
`QUANTUI_COURSE_BASIS_SETS`, a JSON file named by `QUANTUI_COURSE_PRESET`,
or a `course` section in the settings file. Full lists by default; unknown
names are ignored with a log warning; students see a one-line note. See
`docs/course-preset.md`.

### Changed

- **New default theme: Warm.** A cream page with warm charcoal text and a
deep teal accent replaces Dark as the default; every text, button and
focus-ring colour meets WCAG AA. The former Light theme is now called
**Bright**; a saved "Light" choice opens as Bright. 3D viewers and plots on
light themes sit on the page colour instead of pure white.

- **Frequency calculations optimize the geometry first by default.**
"Geometry optimization before calculation" now starts ticked for
Frequency (other calculation types keep it unticked, and each type
remembers your own choice). Library and pasted structures are not minima at
the chosen level, so frequencies and thermochemistry at them were not
meaningful. The optimization is skipped automatically, with a line in the
log, when the structure already is the result of a QuantUI optimization
(Geometry Opt, Transition State, or a Frequency run that optimized first)
at the same method, basis, charge, multiplicity and solvent.
- **"Completed with warnings" instead of a green tick.** When a result
carries a warning (not a stationary point, imaginary frequencies, a
calculation or solver that did not converge, a failed optimization before
the calculation), the completion banner turns amber and names the warning,
the run status says so, the log ends with "completed with warnings", and
"Converged: Yes" on a non-stationary Frequency result is no longer green.
- **Plain-language warnings in the log digest.** Known solver messages (for
example the Krylov solver used for Raman activities) are summarised in one
sentence that says what they mean for the numbers; the raw lines stay in
the full log.
- **The run log ends on a summary.** While a calculation runs, its output
still streams live. When it finishes (or fails, or is cancelled), the log
area shows a short summary first: the result, the key numbers, any
warnings and the time. The complete output is one click away under
**Show full log**, and is still saved with the result. The log no longer
jumps back to the banner at the top when a run ends.
- **Compare shows energy differences.** The chart and table now give ΔE in
kJ/mol relative to the first ticked result (plus the HOMO–LUMO gap), with
short labels such as "H2O · RHF/3-21G · 20:54" instead of result folder
names. Any results can still be compared, but an amber note says when
they are for different molecules or at different methods or basis sets,
whose total energies are not directly comparable. The chart follows the
theme. Before any calculation is saved, Compare says what to do, and the
Compare button appears once two results are ticked.
- **Results tab before the first result** explains what to do, with buttons
to the Calculate tab and to History, instead of a blank page.
- **Energy-level diagram:** fills the panel width (up to 900 px) and by
default frames ±15 eV around the HOMO–LUMO gap, so the frontier orbitals
are readable; the Y range fields or "Show core orbitals" show the rest.
Symmetry labels are subscripted (a₁, b₂).
- **IR spectrum:** the sticks use the theme's accent colour (the fixed blue
was hard to see on dark themes), the highest band no longer sits on the
plot edge, and the axis option reads "High → low wavenumber".
- **Report Issue can reach your instructor.** A course deployment (for
example on NCShare) can set `QUANTUI_ISSUE_DIR` to a folder the instructor
reads; each report is then also saved there, and the dialog says that your
instructor sees it (with your username and a snapshot of the session).
Without it the dialog says the report stays on this computer; on a cluster
session without a folder it asks you to tell your instructor the issue
number. The confirmation now stays visible after Submit.
- **One status for the header and the footer.** The status chip in the
header and the workspace footer now show the same job state (Idle,
Running…, Done, Done — with warnings, Failed); the chip no longer drops back
to "Idle" after a run, and it is no longer a button.

- **One 3D viewer with the workspace.** The Populations, Vibrational and
Isosurface panels show their 3D view in the workspace pane instead of a
viewer of their own: opening the panel, choosing a mode or generating a
surface puts it in the pane, with a "Showing … — Back to structure" banner.
The Results tab no longer repeats the pane's viewer. For orbitals, "Keep
the surface here" shows the surface in its panel next to the plain
structure in the pane. With the workspace turned off, every panel keeps its
own viewer as before.
- **Analysis opens one panel.** Only the main panel for the result is
expanded; the others stay collapsed with their titles visible (a Frequency
result was a 6,600 px page).
- **Workspace pane before a molecule** shows "Load a molecule to see it here"
and a Load molecule button instead of an empty toolbar, measurement panel
and atom list.
- **Narrow windows (< 1100 px):** the stacked pane shows the viewer and
scrolls the rest inside itself, so the tabs start much higher; tab labels
are no longer clipped (the tab bar scrolls sideways).
- **Lighting** moved into the pane's view toolbar, next to the viewer it
changes.
- **Setup dialog:** "Open in dialog" sits in the Calculation Setup heading
(it was clipped and floating), the heading is not repeated inside the
dialog, and the footer note is one line.
- **Small molecules fill the viewer** when they open (water was a dot in the
middle of the viewer).
- **Formulas are subscripted** (H₂O) in the molecule summary, the workspace
pane, the Results cards, the setup dialog title, the Analysis heading and
History; vibrational-mode labels use a₁ like the mode table.
- **No absolute paths in student views:** "Saved — find it in History"
with a short path (`results/…`, `~/…`); the full path is in its tooltip and
Copy path still copies it. History and the Files tab do the same.
- **System Settings:** optional parts that are not installed (GPU offload,
PyFock, online search) show a neutral "Not installed (optional)" chip
instead of a red cross, with install hints under "Details for
instructors"; labels no longer wrap.
- **Menu wording:** Results → Analysis panels use the panel titles
("Energy-level Diagram", "Orbital Isosurface"); unavailable items say
"Available after: Single Point, Geometry Opt" (no more "a NMR").
- **Icons, not emoji,** for status in the UI (GPU badge, loading and
rendering messages, Export Animation, History markers `[SLURM …]` and
`[calibration]`, folders in Files shown as `name/`).
- **Theme colours** replace hard-coded light-theme text colours in the 3D
viewer and orbital modules (rendering and error messages, frame-stepper
buttons).
- **Cards** (descriptor cards, result cards, info boxes, System Settings)
have a thin full border instead of a 4 px side stripe.
- **Logo** sits on a soft light disc in dark palettes, so it no longer
reads as a dim dot.
- **Help → Using the menus** describes keyboard use (focus ring, skip link,
arrow keys in menus).

### Fixed

- The Raman spectrum follows a theme switch; it used to keep the colours of
the theme active when the calculation ran, which hid its axis titles on
light themes.
- The gold "minimum" star on PES scan plots has an outline, so it stays
visible on light backgrounds and on the light end of the 2-D colour scale.

- The run status line next to Cancel wraps instead of being cut off at the
panel edge.
- Internal lines are hidden from the on-screen run log again (checkpoint
bookkeeping such as "[checkpoint] opened — /root/…", PySCF's machine and
version header, and its [CONFIG]/[INPUT] echo); the saved log keeps them.
- The first run's output no longer starts glued to the "Output and any
errors appear here…" placeholder.
- Invalid XYZ input: the error now lists every bad line ("Line 5: 'Xx' is
not an element symbol"), wraps instead of running off the panel, and is
shown in the error colour; the atom table is greyed out with a note while
it does not match the text, and a successful load fills it with the loaded
molecule.

### Accessibility

- **Visible keyboard focus.** One `:focus-visible` rule in the theme draws a
2 px ring in the palette's accent colour (at least 3:1 on every palette)
around buttons, dropdowns (including the Theme selector), text inputs, tabs
and accordion headers. Mouse clicks do not show it.
- **Keyboard menus.** The menu bar has menu roles (`menubar`, `menu`,
`menuitem`, `aria-expanded`, `aria-disabled`). ArrowDown/ArrowUp open a
menu and move through its items, ArrowLeft/ArrowRight move between menus,
Home/End jump to the ends, Esc closes the menu and returns focus to its
title.
- **Setup dialog** is announced as a modal dialog; focus moves into it, Tab
stays inside it, and focus returns to the opener when it closes.
- **Run status is announced** to screen readers (a polite live region says
when a calculation starts, finishes or fails).
- **Shorter Tab path:** the header status chip is no longer a Tab stop, and a
"Skip to molecule input" link appears on the first Tab press.
- **Contrast (WCAG AA):** secondary text in the Midnight, Dark Blue, Dark
Maroon and Hot Pink palettes now clears 4.5:1 (was 3.5–4.46:1); in Light,
the Run button and success-coloured text use a darker green (5.0:1, was
3.3:1) and the lightest grey text is darker (5.1:1, was 4.3:1). A test now
computes contrast from the tokens of every palette.
- **Disabled buttons look disabled** on every palette: panel-coloured
surface, subtle text and a dashed border instead of a faded accent colour
(a disabled Run looked clickable on dark palettes).


## [0.13.2] - 2026-12-05

### Changed
Expand Down Expand Up @@ -1745,7 +1917,8 @@ Initial public scaffolding of the QuantUI package: `quantui` package with
`calculator.py`, basic notebook launcher, Apptainer container definition,
MIT license, and project metadata.

[Unreleased]: https://github.com/The-Schultz-Lab/QuantUI/compare/v0.13.2...HEAD
[Unreleased]: https://github.com/The-Schultz-Lab/QuantUI/compare/v0.14.0...HEAD
[0.14.0]: https://github.com/The-Schultz-Lab/QuantUI/compare/v0.13.2...v0.14.0
[0.13.2]: https://github.com/The-Schultz-Lab/QuantUI/compare/v0.13.1...v0.13.2
[0.13.1]: https://github.com/The-Schultz-Lab/QuantUI/compare/v0.13.0...v0.13.1
[0.13.0]: https://github.com/The-Schultz-Lab/QuantUI/compare/v0.12.0...v0.13.0
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ Real output from QuantUI, straight from the app:
- **Timing calibration** — one-click benchmark suite populates the time
estimator with real machine data so predictions are accurate from the first run
- **Voilà app mode** — serve the notebook as a polished widget-only UI (no
code visible), with six colour themes (Light, Dark, Midnight, Dark Blue,
Hot Pink, Dark Maroon), a dedicated output log, and an
code visible), with seven colour themes (Warm, the default; Bright, Dark,
Midnight, Dark Blue, Hot Pink, Dark Maroon), a dedicated output log, and an
in-app bug-report form

---
Expand Down
37 changes: 37 additions & 0 deletions apptainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,35 @@ shielding, 1D PES scan, and Reorganization Energy; PCM implicit solvent

---

## Collecting Report Issue submissions

Students can report a problem from the app's **Report Issue** button. By
default the report (with a snapshot of the session) is saved only on the
student's own account (`~/.quantui/logs/issues.db`), and the dialog says so.

For a course deployment, for example on NCShare, point
`QUANTUI_ISSUE_DIR` at a folder you can read and students can write to.
Every report is then also written there as one JSON file
(`<UTC time>-<login>-<id>.json`: the description, the login name and the
session snapshot), and the dialog tells students that **their instructor**
sees it. If a student's copy cannot be written there, the dialog says so
and asks them to give you the issue number.

A drop-box folder lets students add reports without reading each other's:

```bash
mkdir -p /shared/course/quantui-issues
chmod 1733 /shared/course/quantui-issues # write + enter for all, no listing, sticky
```

Set the variable where the students' QuantUI kernel starts, for example in
the Apptainer image (`%environment` in `quantui.def`), with
`apptainer exec --env QUANTUI_ISSUE_DIR=/shared/course/quantui-issues …`, or
in the JupyterHub spawner environment. Students' home folders keep their own
copy either way.

---

## Distributing to students

The `.sif` is a single self-contained file — share it however is convenient:
Expand Down Expand Up @@ -345,6 +374,14 @@ apptainer run quantui.sif app

No Python, no conda, no pip — everything is bundled.

### Limit methods and basis sets for a course

To offer students only the methods and basis sets a course uses, set
`QUANTUI_COURSE_METHODS` / `QUANTUI_COURSE_BASIS_SETS` (comma-separated) or
point `QUANTUI_COURSE_PRESET` at a JSON preset file, e.g.
`apptainer run --env QUANTUI_COURSE_METHODS="RHF,B3LYP" quantui.sif app`.
See [Course preset](../docs/course-preset.md).

---

## Rebuilding after code changes
Expand Down
1 change: 1 addition & 0 deletions docs/CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ chaining, `--queue-rest`, `check`):
| `QUANTUI_ENABLE_SLURM` | Opt in to **SLURM batch (cluster)** on the System Settings → Execution backend dropdown. Requires `sbatch` on PATH. Off by default so student deployments stay in-kernel until an operator enables cluster mode in the Apptainer image, JupyterHub spawner, or shell. Accepted truthy values: `1`, `true`, `yes`, `on`. |
| `QUANTUI_MAX_CONCURRENT_JOBS` | Most QuantUI SLURM jobs queued or running at once (app and `quantui submit`; default `2`). |
| `QUANTUI_SLURM_SUBMIT_COOLDOWN_S` | Minimum seconds between SLURM submits (default `30`; `0` disables). `quantui submit` waits it out between input files. |
| `QUANTUI_ISSUE_DIR` | Folder where an instructor collects **Report Issue** submissions. When set, each report is also written there as `<UTC time>-<login>-<id>.json`, and the dialog tells students that their instructor sees it. Unset: reports stay on the student's computer. See [Collecting Report Issue submissions](https://github.com/The-Schultz-Lab/QuantUI/blob/main/apptainer/README.md#collecting-report-issue-submissions). |
| `QUANTUI_FREQ_PARALLEL` | Opt in to parallel **CPU** workers for the IR/Raman finite-difference displacement loops in frequency calculations (`6N` displaced SCFs). Same effect as the **Parallelize IR/Raman displacements (CPU)** checkbox on the System Settings tab; when this env var is set it overrides the saved setting. Reference SCF and Hessian still use gpu4pyscf when available. Requires ≥4 cores and ≥2 atoms. Off by default. Accepted truthy values: `1`, `true`, `yes`, `on`. |

---
Expand Down
Loading