Skip to content

Energy-based contact and GUI refinements - #2

Merged
seamm merged 7 commits into
mainfrom
dev
Jul 6, 2026
Merged

Energy-based contact and GUI refinements#2
seamm merged 7 commits into
mainfrom
dev

Conversation

@paulsaxe

@paulsaxe paulsaxe commented Jul 6, 2026

Copy link
Copy Markdown
Contributor
  • Added an energy contact method: with a Model Chemistry step before the Dimer Builder step, the contact distance is found from the energy minimum along each approach direction (falling back to the van der Waals estimate for orientations with no binding well). It uses the new seamm_mdi MDI driver to evaluate the energy, and reports which model chemistry was used and how many times it was called.
  • Configuration names now use a comma (e.g. 2,1) rather than a slash, which is reserved for separating system and configuration names.
  • The dialog no longer shows the unused Flowchart tab, and reminds you to add a Model Chemistry step when the energy contact method is chosen and none precedes this step.

paulsaxe and others added 7 commits June 30, 2026 22:06
When 'contact method' is 'energy', start one MDI engine for the dimer (from the
upstream _model_chemistry, like LAMMPS) and, per orientation, find the energy
minimum along the approach axis to anchor the surface-gap scan there instead of
the vdW contact. Both modes; engine started once and closed in a finally.

* _open_energy_engine: build MDIEngine from the model chemistry's
  get_mdi_engine_command (seamm_mdi imported lazily -- runtime-only dep).
* _energy_anchor + _minimize_on_grid: derivative-free 1-D minimum on a grid with
  a parabolic refine (enough to anchor the scan). Unit-tested with a fake engine.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Anchor search now uses a narrower window (seed-0.5 .. seed+3) at a finer step
  (11 points), so the parabolic refine tracks the real minimum instead of being
  skewed outward by the steep repulsive wall (verified vs real MOPAC: an H-bond
  water dimer anchors at ~2.8 A).
* When the energy is still falling at the outer edge (a repulsive orientation
  with no binding well), fall back to the vdW contact anchor. Unit-tested with a
  monotonic fake engine.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Configuration naming 'orientation,distance' now uses a comma (e.g. 2,1) rather
  than '/', which is reserved for splitting system and configuration names.
* When the energy contact method is used, report which model chemistry was
  called and how many times (via MDIEngine.n_energy_calls) in the step output.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The sub-flowchart is no longer used -- the 'energy' contact method drives an
engine via a model chemistry over MDI -- so drop the Flowchart tab from the
dialog (keep Parameters + the base Results tab; tk_subflowchart stays None). Add
a note, shown when contact method = energy, that a Model Chemistry step must
precede this step. The node keeps its (empty) sub-flowchart for a possible future
non-MDI fallback.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Walk back through the non-graphical nodes (node.previous()) and suppress the
'needs a Model Chemistry step' note when a ModelChemistry node is already
upstream. Detected by Python type (class name + module) to avoid an import
dependency; defaults to showing the note on any error.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…2026.7.6

Replace the cookiecutter stub docs with a real User Guide (input modes, the
radial scan and spacing, the energy contact method + required Model Chemistry
step, fixed/movable subsets, tagged geometry properties, output naming), a
proper index tagline, and a developer-guide campaign entry pointing to the
seamm_mdi campaign notes. Add the 2026.7.6 HISTORY entry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@paulsaxe paulsaxe added the enhancement New feature or request label Jul 6, 2026
@paulsaxe
paulsaxe requested a review from seamm July 6, 2026 17:11

@seamm seamm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@seamm
seamm merged commit 7763193 into main Jul 6, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants