Skip to content

Re-allowing disordered Slabs#77

Merged
shyuep merged 3 commits into
materialsproject:mainfrom
Sanftperlig:disordered_slab
Jun 30, 2026
Merged

Re-allowing disordered Slabs#77
shyuep merged 3 commits into
materialsproject:mainfrom
Sanftperlig:disordered_slab

Conversation

@Sanftperlig

Copy link
Copy Markdown
Contributor

Re-allows the generation of Slabs from disordered species, like before #24.
This isn't a new feature, but the OUC from #24 used .species instead of .species_and_occu, accidentally disallowing the generation of disordered Slabs.

Checklist

  • Google format doc strings added. Check with ruff.
  • Type annotations included. Check with mypy.
  • Tests added for new features/fixes.
  • If applicable, new classes/functions/modules have duecredit @due.dcite decorators to reference relevant papers by DOI (example)

@Sanftperlig Sanftperlig requested a review from shyuep as a code owner June 7, 2026 17:48
@Sanftperlig

Copy link
Copy Markdown
Contributor Author

The formatting issue should be fixed now, it was my mistake for only running ruff on the non-test part, sorry.

@shyuep

shyuep commented Jun 23, 2026

Copy link
Copy Markdown
Member

🤖 Automated PR review (generated by Claude on behalf of @shyuep)

Minimal, correct fix: switching oriented_unit_cell.species.species_and_occu preserves partial site occupancies when rebuilding the oriented unit cell, which is what re-enables disordered slab generation. The added test_disordered_slab covers the Na/K case. CI is green. LGTM.

@shyuep shyuep merged commit b22ac04 into materialsproject:main Jun 30, 2026
5 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.

2 participants