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

pyiron / pyiron_workflow_atomistics / 25746545861
90%

Build:
DEFAULT BRANCH: main
Ran 12 May 2026 04:05PM UTC
Jobs 1
Files 30
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

12 May 2026 04:03PM UTC coverage: 42.0%. Remained the same
25746545861

push

github

web-flow
fix(physics/surface): use bulk_structure as the bulk reference for mu_bulk (#31)

Before: `calculate_surface_energy` derived `mu_bulk` from a relaxed
no-vacuum slab (`slab_novac`, vacuum=0). With `vacuum=0`, ASE's
`surface()` builds a cell whose c-vector is the slab thickness, so the
"bulk" reference is actually a stack of (hkl) planes with the wrong
c-spacing. Relaxing that pseudo-cell produces a per-atom energy that
disagrees with true bulk by ~1 eV/atom for typical EAM/EMT cases. For
Fe (Al-Fe.eam.fs) BCC (111), 4 layers, vacuum=10 this gave the
nonsensical sign-flipped result `gamma = -2.314 J/m^2` reported by the
post-cleanup notebook.

After: `mu_bulk` is computed by relaxing the `bulk_structure` parameter
itself under a "bulk_ref" subdirectory (routed via `subengine` so the
call is safe inside the macro graph). Users can still override by
passing an explicit `mu_bulk` float. Same Fe(111) configuration now
gives `gamma = 1.973 J/m^2`, in the expected range for this potential
(DFT reports ~2.73 J/m^2; EAM is known to underestimate).

- physics/surface.py: drop slab_novac construction; rename
  `_calculate_if_not_present_` to `_bulk_per_atom_energy` and pass it
  the real bulk_structure; compute area from slab_vac (same in-plane
  vectors as the no-vacuum slab anyway).
- tests/unit/physics/test_surface.py: tighten the @slow test to assert
  `0.3 < gamma < 3.0` (rejects the previous sign-flipped result) and
  add a second test exercising the explicit-mu_bulk path.
- notebooks/surface_energy.ipynb: re-executed; now prints
  `Fe(111) surface energy (Al-Fe.eam.fs): 1.973 J/m^2` instead of
  `-2.314 J/m^2`.

Addresses Concern #2 from the cleanup-and-reorganise final review.

Co-authored-by: Han Mai <ligerzerof@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

861 of 2050 relevant lines covered (42.0%)

0.42 hits per line

Coverage Regressions

Lines Coverage ∆ File
14
0.0
0.0% physics/surface.py
Jobs
ID Job ID Ran Files Coverage
1 25746545861.1 12 May 2026 04:05PM UTC 30
42.0
GitHub Action Run
Source Files on build 25746545861
  • Tree
  • List 30
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25746545861
  • 0e78f221 on github
  • Prev Build on main (#25746533205)
  • Next Build on main (#25747697860)
  • 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