Repository navigation
feat(confsearch): TUI entry (P5) - #67
Merged
Merged
Conversation
Tracking: #61 (spec revision 4, phase P5) Part of the MD-based configuration search feature. What was missing: the TUI could not start a confsearch run at all (the capability matrix recorded `no` for every confsearch TUI column). What this adds: - main screen: a "Configuration Search (CONFSEARCH)" entry, and the template screen plus `mliport template confsearch` can now generate the INCAR template. - configuration screen: a confsearch form with both start modes (Structure File + 0-based Adsorbate Indices for mode A; Slab File + Molecule File + Number of Placed Starts for mode B), cycles, MD-mobile set, high/low temperature, hold/cool durations and exported top-K, plus a note that the ranking reports the lowest minimum found (never a global minimum) and that a one-sided slab needs a dipole correction in the DFT single point. - validation in _save_and_run: mixing mode A and B, a partial mode B, missing paths, non-integer counts, non-finite/negative temperatures and low > high all fail with a notification instead of launching a bad job; mode B names the slab as the structural input so the shared guard still applies. - run screen: the confsearch branch forwards every confsearch option and the mode A/B structural fields to the *shared* `build_mliport_command` helper, so the TUI and `mliport queue submit` cannot drift. - capability matrix: confsearch_user_starts and confsearch_placement are now `yes` for the TUI; resume/extend/merge/export stay `no` with notes (resuming is a command). - docs (EN + ZH): a sentence on the TUI entry and on extend/merge being commands, structure unchanged. Tests: four TUI tests (the main-screen entry, the confsearch form widgets, the mode A and mode B background commands, and the partial-mode-B rejection). Full suite on CPU: 1602 passed, 33 skipped. DATA IMPACT: no scientific record invalidated. New entry point only.
6 tasks done
hydrogen1222
commented
Oct 25, 2026
hydrogen1222
left a comment
Owner
Author
There was a problem hiding this comment.
Review (spec rev 5) — P5: OK after the stack is fixed
The TUI branch uses the shared build_mliport_command, validates mode A/B mixing, and the capability matrix is honest about resume/extend/merge/export being command-only. No changes requested here; re-check after #63–#66 change the option set (e.g. anchor partner semantics) so the TUI form text stays accurate.
🤖 Generated with Claude Code
Generated by Claude Code
hydrogen1222
force-pushed
the
confsearch/p4-queue-p5-validation
branch
from
October 25, 2026 16:32
6fe4248 to
079d957
Compare
Tracking: #61 (spec revision 5, PR #67 review) The #67 review asked for a re-check after #63-#66 changed the option set. The TUI form exposes only mode A/B starts, cycles, the MD-mobile set, temperatures, hold/cool durations and top-K, none of which changed semantics in revision 5; anchored placement (whose partner set did change, section 5.2) is not exposed in the TUI, and the live append-only `run.log` from section 11.1 makes the run screen's progress tailing strictly better. The existing TUI test now also pins the wording the review cares about: the caveat note keeps "never a global minimum" and the dipole-correction advice, and the mode note keeps the 0-based ASE convention and states that mode B is placement rather than user starts. Full suite on CPU: 1632 passed, 33 skipped; ruff check/format and the repository hygiene check are clean. DATA IMPACT: no scientific record invalidated. Test-only change.
hydrogen1222
added a commit
that referenced
this pull request
Oct 25, 2026
Tracking: #61 (spec revision 5, PR #67 review) The #67 review asked for a re-check after #63-#66 changed the option set. The TUI form exposes only mode A/B starts, cycles, the MD-mobile set, temperatures, hold/cool durations and top-K, none of which changed semantics in revision 5; anchored placement (whose partner set did change, section 5.2) is not exposed in the TUI, and the live append-only `run.log` from section 11.1 makes the run screen's progress tailing strictly better. The existing TUI test now also pins the wording the review cares about: the caveat note keeps "never a global minimum" and the dipole-correction advice, and the mode note keeps the 0-based ASE convention and states that mode B is placement rather than user starts. Full suite on CPU: 1632 passed, 33 skipped; ruff check/format and the repository hygiene check are clean. DATA IMPACT: no scientific record invalidated. Test-only change.
hydrogen1222
force-pushed
the
confsearch/p5-tui
branch
from
October 25, 2026 16:41
65b9485 to
d62cd98
Compare
hydrogen1222
force-pushed
the
confsearch/p4-queue-p5-validation
branch
from
October 25, 2026 16:45
079d957 to
8811715
Compare
hydrogen1222
force-pushed
the
confsearch/p5-tui
branch
from
October 25, 2026 16:45
d62cd98 to
1dfa1ad
Compare
hydrogen1222
added a commit
that referenced
this pull request
Oct 25, 2026
Tracking: #61 (spec revision 5, PR #67 review) The #67 review asked for a re-check after #63-#66 changed the option set. The TUI form exposes only mode A/B starts, cycles, the MD-mobile set, temperatures, hold/cool durations and top-K, none of which changed semantics in revision 5; anchored placement (whose partner set did change, section 5.2) is not exposed in the TUI, and the live append-only `run.log` from section 11.1 makes the run screen's progress tailing strictly better. The existing TUI test now also pins the wording the review cares about: the caveat note keeps "never a global minimum" and the dipole-correction advice, and the mode note keeps the 0-based ASE convention and states that mode B is placement rather than user starts. Full suite on CPU: 1632 passed, 33 skipped; ruff check/format and the repository hygiene check are clean. DATA IMPACT: no scientific record invalidated. Test-only change.
hydrogen1222
commented
Oct 26, 2026
hydrogen1222
left a comment
Owner
Author
There was a problem hiding this comment.
Second review (spec rev 6) — P5: no changes
Re-checked after the rev 5 changes; the TUI does not expose anchored placement and the pinned wording is right. Nothing further here.
🤖 Generated with Claude Code
Generated by Claude Code
hydrogen1222
force-pushed
the
confsearch/p4-queue-p5-validation
branch
from
October 26, 2026 03:13
8811715 to
eb766e1
Compare
hydrogen1222
force-pushed
the
confsearch/p5-tui
branch
from
October 26, 2026 03:14
1dfa1ad to
2acb226
Compare
hydrogen1222
added a commit
that referenced
this pull request
Oct 26, 2026
Tracking: #61 (spec revision 5, PR #67 review) The #67 review asked for a re-check after #63-#66 changed the option set. The TUI form exposes only mode A/B starts, cycles, the MD-mobile set, temperatures, hold/cool durations and top-K, none of which changed semantics in revision 5; anchored placement (whose partner set did change, section 5.2) is not exposed in the TUI, and the live append-only `run.log` from section 11.1 makes the run screen's progress tailing strictly better. The existing TUI test now also pins the wording the review cares about: the caveat note keeps "never a global minimum" and the dipole-correction advice, and the mode note keeps the 0-based ASE convention and states that mode B is placement rather than user starts. Full suite on CPU: 1632 passed, 33 skipped; ruff check/format and the repository hygiene check are clean. DATA IMPACT: no scientific record invalidated. Test-only change.
hydrogen1222
force-pushed
the
confsearch/p4-queue-p5-validation
branch
from
October 26, 2026 03:18
eb766e1 to
54ba7f7
Compare
hydrogen1222
force-pushed
the
confsearch/p5-tui
branch
from
October 26, 2026 03:18
2acb226 to
0ebf825
Compare
hydrogen1222
marked this pull request as ready for review
October 26, 2026 04:17
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.
Tracking: #61
Implements spec revision 4, phase P5.
What this does
Adds the TUI entry for the configuration search:
screen plus
mliport template confsearchcan generate the INCAR template.Indices for mode A; Slab File + Molecule File + Number of Placed Starts for
mode B), cycles, MD-mobile set, high/low temperature, hold/cool durations and
exported top-K, plus a note that the ranking reports the lowest minimum found
and that a one-sided slab needs a dipole correction in the DFT single point.
counts, non-finite/negative temperatures and low > high all fail with a
notification instead of launching a bad job.
mode A/B structural fields to the shared
build_mliport_commandhelper,so the TUI and
mliport queue submitcannot drift.confsearch_user_startsandconfsearch_placementare nowyesfor the TUI; resume/extend/merge/export staynowith notes.extend/mergebeingcommands.
What it does NOT do yet
commands; the capability matrix records it).
background-job screen and
run.log.owner on a GPU; it is not part of CI.
Tests run and results
1602 passed, 33 skipped;tests/mliport/mliport/test_tui.pygrew to 44tests, including four new ones: the main-screen entry, the confsearch form
widgets, the mode A and mode B background commands, and the partial-mode-B
rejection.
confsearch --helpremains in the documented CLI smoke list.Deviations from spec
CS_*keys (the ones a user needs tostart a run); the rest stay CLI/INCAR/API-only. The capability matrix says
which interface can express what, per section 12.4.
checkpoint identity checks are easier to get wrong behind a form, and the
spec's CLI grammar has
resumeas a command.run-screen branch were implemented first and then covered by the four tests in
the same commit; the mode-A/mode-B dispatch bug they exposed (the app's
default
cs_n_startsmaking mode A look like mode B) was fixed against thefailing test.
Revision 5 follow-up (review of this PR)
Re-checked after #63-#66 changed the option set:
set, temperatures, hold/cool durations and top-K, none of which changed
semantics in revision 5. Anchored placement (whose partner set changed in
§5.2) is not exposed in the TUI, so there is no form text to correct.
run.logmakes the run screen's log tailingstrictly better (progress appears while the run is going, and a resume
appends).
keeps "never a global minimum" and the dipole-correction advice, and the mode
note keeps the 0-based ASE convention and says mode B is placement rather than
user starts.
mainafter refactor(runners): shared safety helpers for MD and confsearch (P0) #62, so this PR'sdiff is the TUI change only.
Full suite on CPU (rebased stack): 1632 passed, 33 skipped; lint/format and
the repository hygiene check clean; CI green.
Revision 6 follow-up (second review of this PR)
The second review asked for no changes here: the TUI does not expose anchored
placement, and the pinned wording (0-based ASE convention, mode B is placement,
"never a global minimum", dipole-correction advice) is right. The branch was
rebased onto the revision-6 stack so its diff stays the TUI change only.
Full suite on CPU: 1639 passed, 33 skipped; lint/format/hygiene clean; CI
green.