Skip to content

Model test#126

Merged
kewh5868 merged 29 commits into
mainfrom
model-test
May 26, 2026
Merged

Model test#126
kewh5868 merged 29 commits into
mainfrom
model-test

Conversation

@kewh5868
Copy link
Copy Markdown
Owner

@kewh5868 kewh5868 commented May 26, 2026

Here’s a copyable PR comment/body:

## Summary

This PR packages the current SAXSShell feature work into a staged commit series while keeping generated project artifacts out of version control.

## What Changed

- Added `.gitignore` coverage for generated CsPbI3 SAXS fit exports, zip bundles, and generated reports.
- Added a new UV-Vis pseudo-Voigt fitting tool with CLI entry point, Qt UI, Monte Carlo uncertainty support, exports, and tests.
- Added APS detector stitching utilities, a standalone stitching tool, real APS fixture data, and regression tests.
- Added shared structure-distribution caching and browser support, then wired bondanalysis through it with coordination-number analysis and a multi-project batch queue.
- Improved MD trajectory and cluster extraction workflows with frame timestep inference/manual fallback, restart duplicate handling, solvation-shell export behavior, and batch queue ergonomics.
- Streamlined project queue setup for PDF, representative finder, and xyz2pdb workflows, including progress dialogs, bounded consoles, and richer xyz2pdb reference-bond controls.
- Expanded SAXS Prefit and DREAM workflows with active fit q-ranges, DREAM backend batch run sets, posterior filtering/reporting improvements, stoichiometry compensation, dielectric/formal-charge helpers, and legacy/model template updates.
- Updated SAXS user-guide documentation for the new Prefit, DREAM, solvent, stoichiometry, and template behavior.

## Commit Structure

1. `chore: ignore generated SAXS outputs`
2. `feat(uvvis): add pseudo-Voigt fitting tool`
3. `feat(saxs): add APS detector stitching tool`
4. `feat(bondanalysis): cache structure distributions`
5. `feat(cluster): improve trajectory extraction batching`
6. `feat(batch): streamline project queue setup`
7. `feat(saxs): expand Prefit and DREAM workflows`
8. `docs(saxs): document updated Prefit and DREAM models`

## Validation

- All commits passed the local pre-commit flow:
  - end-of-file fixer
  - trailing whitespace
  - case/merge conflict checks
  - TOML/YAML checks where applicable
  - Black
  - flake8
  - isort
  - codespell
  - prettier
  - docformatter
- Confirmed the working tree is clean after the commit series.
- Confirmed generated artifacts are ignored:
  - `docs/reports/`
  - `tests/CsPbI3_SAXS_fit/`
  - `tests/CsPbI3_SAXS_fit.zip`
- Removed the accidental Windows-path export folder from the checkout.

## Test Notes

A broad touched-area pytest run was started across 883 tests covering the new and modified modules. It passed through the APS, UV-Vis, structure-distribution, bondanalysis, cluster, MD trajectory, PDF, representative finder, xyz2pdb, fullrmc, CLI, lazy import, stoichiometry, template-installation, DREAM runtime, and model-report sections before being stopped during the long SAXS UI tail.

Known caveat: several failures appeared in `tests/test_saxs_prefit.py` and `tests/test_saxs_ui.py` before the run was interrupted, but the full failure traceback summary was not collected.

kewh5868 added 28 commits May 7, 2026 16:42
Add shared plotting helpers for Igor-style labels, editable line plots, heatmaps, and stacked histograms. Wire the heatmap editor into cluster dynamics views and vectorize bond/angle measurements used by representative-style plotting workflows.
Add Packmol Docker linking, solvent-shell analysis/building, free-solvent allocation, structure-mode aware Packmol setup, and constraints preview/open helpers. Update the fullrmc UI and tests around the integrated RMC setup flow.
Introduce the representativefinder package, console entry point, run-file workflow, Qt setup/analyzer windows, and representative persistence helpers. Add tests and a performance harness while keeping generated benchmark outputs ignored.
Add a structure-viewer background color control, preserve the selected background across redraws, and cover the behavior in the viewer tests.
Add representative-structure component sources, template metadata capabilities, persisted plot editor state, and 1D/3D Born component workflow integration. Introduce the 3D FFT Born backend/UI and expand project, prefit, electron-density, and SAXS UI tests.
Refresh the docs landing pages, install/setup guides, and user-guide navigation for representative structures, 1D/3D Born workflows, Packmol Docker linking, and updated SAXS/fullrmc terminology.
Run the docformatter hook with Python 3.12 so its untokenize dependency does not build under Python 3.14, where the package setup fails while reading AST constants.
Bring in the latest upstream/main updates before splitting the rmcsetup work into focused local commits.

Includes the native Windows install guidance/environment file, the FullRMC constraint import guard, and the SAXS project-load progress signal fix.
Handle CP2K restart-overlap frames by using source i-index metadata and skipping earlier duplicate source frames by default.

Add an opt-in duplicate export mode, stricter XYZ filename/header validation, and a validate-export CLI command to catch mismatched exports.
Finalize smart solvation shell runs only when they close, preserving deferred unions across contiguous frame runs and resumes.

Add coverage for linear scaling over contiguous runs and for resumed exports that must rebuild deferred shell unions correctly.
Add a reusable Qt periodic-table widget and element picker dialog for workflows that need single-atom component selection.
Extend FullRMC setup to plan supplemental solute and solvent components, track generated Packmol inputs, and expose the workflow in the Qt setup interface with CLI coverage.
Add project-scoped run configuration files and batch-run CLI support for cluster dynamics ML, plus lifetime distribution plotting and tests.
Add saved run configurations, run-file setup UIs, CLI batch execution, and batch queue windows for the core project workflows, with coverage for cluster extraction, cluster dynamics, MD trajectory export, representative selection, and XYZ to PDB conversion.
Add PDF batch queue execution, richer partial/experimental analysis controls, R(r) coordination fitting support, and tests for the expanded Debyer workflow.
Add the Hayter-MSA charged MonoSQ template and a model-scale solvent template, with metadata, documentation, and regression coverage for the solution-scattering conventions.
Wire batch queues and run-file setup tools into the SAXS main window, keep project-writing tool windows single-instance, and add an experimental data overlay viewer with UI coverage.
Add the DMSO molecular-dynamics residue reference JSON and PDB template to the XYZ to PDB reference library.
Update GitHub-facing READMEs and user docs for macOS/Linux versus Windows setup guidance, batch/run-file workflows, and the expanded analysis tools.
Allow templates in the active template directory to be hidden by deprecated metadata, and update installer test fixtures to use current archived template locations with finite DREAM validation output.
Ignore generated CsPbI3 SAXS fit exports and generated report output so project-scale artifacts stay out of review commits.
Add the uvvisfit CLI and top-level launcher, with a PySide fitting workspace for pseudo-Voigt peak models, constraints, Monte Carlo sampling, and report/export helpers. Cover the fitter and UI behavior with dedicated tests.
Add reusable APS 5-ID detector stitching utilities, a standalone Qt tool widget, real detector fixtures, and regression tests that verify detector matching, overlap scaling, and saved stitched output.
Add coordination-number analysis and a reusable structure-distribution store/browser, then wire bondanalysis outputs through that cache and expose a multi-project batch queue. Add CLI, UI, cache invalidation, and batch queue coverage.
Add frame timestep inference/manual fallback through mdtrajectory, improve restart duplicate handling and batch queue controls, and update cluster extraction defaults/output placement for solvation-shell workflows. Reuse the shared structure-distribution cache for cluster dynamics pair-distance sampling.
Avoid expensive auto-inspection while loading multiple projects, add load progress dialogs and bounded consoles, and expand xyz2pdb batch mapping controls with reference bond tolerances and input warnings. Cover PDF, representative finder, and xyz2pdb queue behavior.
Add active Prefit/DREAM fit q-ranges, DREAM backend batch run sets, richer posterior filtering/reporting, stoichiometry compensation, dielectric/formal-charge helpers, and legacy/model-scale template updates. Wire the SAXS UI to the new batch, APS stitch, UV-Vis, and structure-distribution tools, and cover the workflow with focused runtime/UI/template tests.
Update the SAXS guides for legacy and charged MonoSQ templates, dielectric and formal-charge helpers, DREAM search/filter presets, concentration conventions, and solvent-weight bound preservation.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8cd74097fb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

def _resolve_run_file(project_dir: Path, run_file: Path | None) -> Path:
if run_file is None:
return default_clusterdynamics_run_file_path(project_dir)
return Path(run_file).expanduser().resolve()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve custom run-file paths against project directory

When --run-file is provided as a relative path, _resolve_run_file calls Path(run_file).expanduser().resolve(), which resolves against the current working directory instead of project_dir. In practice, running clusterdynamics run /path/to/project --run-file my_run.json from another directory will look for /current/dir/my_run.json (or load the wrong file) rather than /path/to/project/my_run.json, even though this subcommand is defined around a project folder. This makes relative run-file paths unreliable for normal CLI usage outside the project root.

Useful? React with 👍 / 👎.

Resolve overlapping batch queue, MD trajectory, SAXS template, and UI conflicts from origin/main. Keep model-test branch behavior where it extends main, and preserve PDF batch frame inspection while retaining progress-safe saved-project loading.
@kewh5868
Copy link
Copy Markdown
Owner Author

Summary

This PR updates model-test after merging the latest main changes from Rmcsetup (#124) and resolves the overlapping workflow conflicts.

Key additions include:

  • Ignored generated/local artifacts, including tests/CsPbI3_SAXS_fit/, tests/CsPbI3_SAXS_fit.zip, reports, and local-only workspace output.
  • Added the UV-vis pseudo-Voigt fitting tool.
  • Added the APS SAXS detector stitching tool.
  • Added structure-distribution caching for bond/angle analysis consumers.
  • Improved MD trajectory extraction batching, including restart duplicate handling and frame timestep controls.
  • Streamlined batch/project queue setup across MD trajectory, cluster, XYZ-to-PDB, representative finder, and PDF workflows.
  • Expanded SAXS Prefit and DREAM workflows, including updated scaled-solvent MonoSQ templates, charged MonoSQ metadata, concentration/charge helpers, DREAM batching, and documentation.
  • Updated SAXS model documentation for the new Prefit/DREAM model conventions.

Merge Conflict Resolution

Merged origin/main into model-test and resolved conflicts across docs, SAXS templates/UI, MD trajectory workflow/UI, cluster presets/UI, representative finder workflow/UI, XYZ-to-PDB queue UI, PDF Debyer queue UI, and related tests.

Resolution notes:

  • Kept model-test behavior where it extended the incoming main implementation.
  • Preserved the newer PDF batch queue frame-inspection UI from main.
  • Re-applied the safer saved-project loading behavior from model-test so loading many PDF projects shows progress and does not auto-inspect large saved frame folders.
  • Confirmed no conflict markers remain.

Validation

Passed:

  • rg conflict-marker scan
  • python -m json.tool on conflicted JSON files
  • python -m compileall on resolved Python modules
  • git diff --check
  • Pre-commit hooks during merge commit:
    • black
    • flake8
    • isort
    • codespell
    • prettier
    • docformatter
    • merge-conflict check

Partial:

  • Focused pytest run was started for touched conflict areas and reached tests/test_saxs_ui.py.
  • The run was stopped to avoid another long hang; failure markers appeared in tests/test_saxs_ui.py before termination and were not investigated in this merge-resolution pass.

@kewh5868 kewh5868 merged commit a8393b2 into main May 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant