Support skewed in-plane SPM cells#21
Open
cpignedoli wants to merge 4 commits into
Open
Conversation
Member
Author
|
Follow-up fix pushed in Extra validation after the fix:
|
Member
Author
|
Added a follow-up validation for the p-tip path. What changed:
Validation run:
Prepared with assistance from Codex. |
cpignedoli
marked this pull request as ready for review
July 14, 2026 12:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This draft adds initial support for skewed in-plane CP2K SPM cells in the WFN gridding path.
The implementation keeps the existing orthogonal-cell behavior intact while introducing full cell-vector handling for slab-like cells where
AandBlie in the xy plane andCis along z. More general tilted/triclinic cells are deliberately rejected for now instead of being treated incorrectly.This PR is stacked on top of #20 (
codex/numpy2-compat) and should be retargeted tomainafter #20 is merged.Changes
A,B, andCcell vectors without requiring a rectangular cell.kx**2 + ky**2..npzoutputs.examples/validate_skewed_cell_support.pyfor lightweight manual validation with bundled benzene data.Validation
python -m py_compile cp2k_spm_tools/cp2k_grid_orbitals.py cp2k_spm_tools/cp2k_stm_sts.py examples/validate_skewed_cell_support.pygit diff --checkPYTHONPATH=/home/jovyan/opt/cp2k-spm-tools python examples/validate_skewed_cell_support.pypre-commit run --files cp2k_spm_tools/cp2k_grid_orbitals.py cp2k_spm_tools/cp2k_stm_sts.py examples/validate_skewed_cell_support.pyAdditional local check: the standard orthogonal benzene CUBE output was compared against the base NumPy-2 branch and matched exactly for HOMO and LUMO.
Still To Test