• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pyiron / pyiron_workflow_atomistics / 27516372530
90%

Build:
DEFAULT BRANCH: main
Ran 15 Jun 2026 12:16AM UTC
Jobs 1
Files 56
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

13 Jun 2026 01:05PM UTC coverage: 90.069% (+0.04%) from 90.032%
27516372530

push

github

web-flow
fix(elastic/engine): stop macro input-channel leak that froze cell relaxation; honour CalcInputMinimize.max_iterations (#78)

The elastic-constants macro silently skipped cell relaxation even when it
was requested, so elastic constants came out input-dependent (relaxing the
same material from different starting cells gave different K/G, with the
volume frozen at the arbitrary input).

Root cause 1 — input-channel leak into a plain dataclass:
`calculate_elastic_constants` is a `@pwf.as_macro_node`, so its `fmax` and
`max_iterations` arguments are pyiron_workflow input *channels*, not scalars.
Building `CalcInputMinimize(force_convergence_tolerance=fmax, ...)` directly
in the macro body stored a `UserInput` channel object in
`force_convergence_tolerance`. That channel flowed through
`ASEEngine.get_calculate_fn` into ASE's `BFGS.run(fmax=<channel>)`, where the
convergence test `max_force < fmax` against a non-numeric object is satisfied
immediately, so every relaxation "converged" at step 0 and the cell never
moved.

Fix: add a `make_minimize_input` `@pwf.as_function_node` that constructs the
`CalcInputMinimize` at run time (when the inputs are resolved to concrete
floats/ints) and wire both the reference full-relax and the fixed-cell
deformation inputs through it. This is the correct pyiron_workflow pattern:
never pass a macro input channel into a plain Python dataclass at build time.

Root cause 2 — engine silently overrode the iteration cap:
`ASEEngine.max_steps` defaulted to 10_000 and `get_calculate_fn` did
`self.max_steps if self.max_steps else mi.max_iterations`, so an explicit
`CalcInputMinimize.max_iterations` (e.g. 300) was always ignored.

Fix: default `ASEEngine.max_steps` to `None` (meaning "defer to the calc
input") and only let an explicitly-set engine-level `max_steps` win. An
explicit `max_iterations` is now honoured.

Verification (EMT Cu via calculate_elastic_constants): before the fix,
a=3.615 -> K=123, a=3.9 -> K=32.5, both frozen at... (continued)

3392 of 3766 relevant lines covered (90.07%)

0.9 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
94.51
0.25% physics/elastic.py
Jobs
ID Job ID Ran Files Coverage
1 27516372530.1 15 Jun 2026 12:16AM UTC 56
90.07
GitHub Action Run
Source Files on build 27516372530
  • Tree
  • List 56
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27516372530
  • 31c6e46f on github
  • Prev Build on main (#27467292048)
  • Next Build on main (#27585595352)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc