Skip to content

fix: pass material at the two remaining PointsGridDataProvider call sites - #362

Merged
VsevolodX merged 1 commit into
mainfrom
fix/SOF-7990-missed-kgrid-call-sites
Aug 27, 2026
Merged

fix: pass material at the two remaining PointsGridDataProvider call sites#362
VsevolodX merged 1 commit into
mainfrom
fix/SOF-7990-missed-kgrid-call-sites

Conversation

@VsevolodX

@VsevolodX VsevolodX commented Aug 27, 2026

Copy link
Copy Markdown
Member

SOF-7990 made KPPRA and the reciprocal vector ratios derive from the material rather than assume a single atom, so constructing PointsGridDataProvider with dimensions but no material now raises.

Two call sites were missed in #357:

  • workflows/neb.ipynb — builds a k-grid whenever NEB_KGRID is set, and it defaults to [1, 1, 1], so the branch always runs. Uses saved_materials[0], the initial image of the path.
  • specific_examples/interface_bilayer_twisted_commensurate_lattices_molybdenum_disulfide_SIMULATION.ipynb — builds one grid per entry in MATERIALS. Uses materials[name], the loaded material for that entry.

Verified against published mat3ra-wode==2026.8.26.post1: the old form raises KPPRA and reciprocal vector ratios come from material=<mat3ra.made.Material>; the new form returns gridMetricValue=2, reciprocalVectorRatios=[1.0, 1.0, 1.0] for 2-atom Si.

A repo-wide sweep now shows every PointsGridDataProvider( call passing material=.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved k-grid setup across simulation workflows by associating generated grid data with the correct material.
    • Updated bilayer lattice and NEB workflows for more reliable material-specific calculations.

…ites

SOF-7990 made KPPRA and the reciprocal vector ratios derive from the material
rather than assume one atom, so a call without it now raises. These two were
missed: neb.ipynb builds its k-grid unconditionally when NEB_KGRID is set, and
the twisted-bilayer example builds one per entry in MATERIALS.
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 39e9139a-5229-44d0-9c06-0a2c172aaeb4

📥 Commits

Reviewing files that changed from the base of the PR and between 086b276 and 2f86829.

📒 Files selected for processing (2)
  • other/materials_designer/specific_examples/interface_bilayer_twisted_commensurate_lattices_molybdenum_disulfide_SIMULATION.ipynb
  • other/materials_designer/workflows/neb.ipynb

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The bilayer example and NEB workflow now pass material objects to PointsGridDataProvider when they create k-grid context data.

Changes

Material-aware k-grid setup

Layer / File(s) Summary
Pass materials to k-grid providers
other/materials_designer/specific_examples/interface_bilayer_twisted_commensurate_lattices_molybdenum_disulfide_SIMULATION.ipynb, other/materials_designer/workflows/neb.ipynb
The bilayer example passes materials[name]. The NEB workflow passes saved_materials[0] to PointsGridDataProvider.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 2f868

The change updates two notebook call sites to provide the required material when constructing k-grid providers. It is localized and merge-ready after normal checks and review, with no actionable merge-blocking risk remaining.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: passing material data at the two remaining PointsGridDataProvider call sites.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/SOF-7990-missed-kgrid-call-sites

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@VsevolodX
VsevolodX merged commit 4c1c36a into main Aug 27, 2026
8 checks passed
@VsevolodX
VsevolodX deleted the fix/SOF-7990-missed-kgrid-call-sites branch August 27, 2026 03:13
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.

2 participants