Repository navigation
Release 0.13.2: one viewer with pick modes; PyFock step energies - #181
Merged
Merged
Conversation
PyFock's ASE calculator reports energies in eV using its own constant (pyfock.Data.au2eVFactor = 27.211324570273), while the optimizer divided by QuantUI's CODATA 2018 value (27.211386...). Every optimization step energy except the final one (which comes from the required single point) was therefore high by 2.3e-6 of the total energy: 1.7225e-4 Eh for water, predicted exactly by the ratio of the two constants, and about 1.4 kcal/mol near -1000 Eh. The optimizer now converts PyFock energies with PyFock's factor (falling back to QuantUI's if PyFock cannot be imported). Forces carried the same 2.3e-6 relative factor, which does not affect convergence. Contributions: - Claude (Opus 5.5): code edits, review, and conceptual discussion - Jonathan Schultz: overall vision, planning, review, and orchestration Co-authored-by: Jonathan Schultz <nccu-schultz-lab@users.noreply.github.com>
The app path's saved result keeps only the final energy, which comes from the required single point, so a constant offset in the optimization's step energies went unnoticed. The geometry-optimization check now also compares the first step's energy (starting geometry) with the backend. Without the previous commit the PyFock case fails here (1.73e-4 Eh); with it, it passes. Contributions: - Claude (Opus 5.5): code edits, review, and conceptual discussion - Jonathan Schultz: overall vision, planning, review, and orchestration Co-authored-by: Jonathan Schultz <nccu-schultz-lab@users.noreply.github.com>
Selection sync brought the picked atom's row into view with scrollIntoView, which also scrolls every scrollable ancestor: the height-capped pane body (and the page). Each click on an atom therefore slid the 3D viewer up, away from the pointer, while the student was still clicking atoms in it. Scroll the atom list's own box instead, leaving the pane and the page where they are. Contributions: - Claude (Opus 5.5): code edits, review, and conceptual discussion - Jonathan Schultz: overall vision, planning, review, and orchestration Co-authored-by: Jonathan Schultz <nccu-schultz-lab@users.noreply.github.com>
… scans
With the two-pane workspace on, the Calculate tab still drew its own 3D
viewer, so the molecule appeared twice. It was kept because Edit
Structure and PES scan click-to-pick wired their clicks and highlights
into it. Those tools now pick on the pane's viewer instead, and the
Calculate tab's viewer, its backend toggle and style dropdown are hidden
(and left empty) while the workspace is on.
New companion module app_pick_mode gives the pane's viewer an explicit
pick mode, exactly one at a time:
- measure (normal): click-to-measure and atom-list selection;
- edit: while the Edit Structure panel is open;
- scan: while Calc. Type is PES Scan (Edit Structure wins if both).
A pick mode is entered only while the Calculate tab is selected. It
shows the Calculate-tab molecule with atom numbers and wires the tool's
own click inbox and highlight slot into the viewer, so the tools'
handlers and highlight pushes are unchanged. Atom-list row clicks, the
row highlights, Clear selection and the status footer follow the active
tool. A banner at the top of the pane says "Clicking picks atoms for
..." with Done (Done closes Edit Structure, or pauses scan picking).
Leaving the mode puts back what the viewer showed before, so a result
stays a result. A result arriving during a pick mode pauses it; the
banner then offers "Pick atoms" to resume, as does reopening Edit
Structure or choosing PES Scan again. With PlotlyMol the banner says
that picking by clicking needs py3Dmol.
app.py gets hooks only: _refresh_calc_mol_viewer syncs the pick mode
instead of drawing when the workspace is on, the root-tab observer
syncs it, _rerender_3d_views keeps the tool's wiring on a redraw, and a
lighting change redraws the workspace viewer. Switching the workspace
off leaves any pick mode and gives the Calculate viewer (with its tool
wiring) back; that path is unchanged.
The setup dialog still covers the page, so its hint ("close the dialog
first" to pick scan atoms) stays accurate. Help text for measuring,
Edit Structure and PES picking says where the clicks go. Tests that
check the Calculate viewer itself now switch the workspace off first.
Contributions:
- Claude (Opus 5.5): code edits, review, and conceptual discussion
- Jonathan Schultz: overall vision, planning, review, and orchestration
Co-authored-by: Jonathan Schultz <nccu-schultz-lab@users.noreply.github.com>
Version 0.13.2; CHANGELOG [0.13.2] - 2026-12-05: one molecule viewer with the two-pane workspace (Edit Structure and PES-scan picking in the pane), and the PyFock optimization step-energy fix. Contributions: - Claude (Opus 5.5): code edits, review, and conceptual discussion - Jonathan Schultz: overall vision, planning, review, and orchestration Co-authored-by: Jonathan Schultz <nccu-schultz-lab@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One molecule viewer when the two-pane workspace is on, and a fix for PyFock optimization step energies. Merging this releases 0.13.2 automatically.
One viewer (workspace on)
quantui/app_pick_mode.py): measure (normal), edit, scan — one at a time, active while the Calculate tab is selected.PyFock step energies
Testing
pytest -m "not network and not weekly": 5464 passed, 11 skipped. ruff, black, mypy (CI invocation) clean.tests/test_app_pick_mode.py(35),tests/test_pyfock_energy_units.py(3).quantui xcheck --engine pyfock --case pf-opt-h2o-pbe-def2svp, PyFock 0.2.7): PASS (3) with the fix, FAIL (1.73e-4 Eh) without.Authorship
Generated by Claude Code