Repository navigation
Conversation
Stardust0831
marked this pull request as ready for review
October 20, 2026 13:26
Collaborator
|
Thanks for the fix. |
mohanchen
approved these changes
Oct 21, 2026
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.
Preserve the user's explicitly specified, valid magnetic mixing parameters instead of silently resetting them. For
nspin=2/4, omittingmixing_betacurrently changes an explicitmixing_beta_mag=0.2andmixing_gg0_mag=0.7to1.6and0.0. This PR retains0.2/0.7while resolving the omitted charge-mixing default.#7719 tracks INPUT finalization that silently changes user-specified parameters and can make an explicit value behave differently from the equivalent default. Its central requirement is to preserve valid explicit input and replace silent correction of invalid or contradictory input with a clear error: name the offending parameters and values, explain the conflict, and provide legal values/corrective guidance and the relevant manual link. Intentional defaults for omitted parameters remain useful; they must not overwrite the user's explicit choices.
This small PR handles the preservation side of that contract: these magnetic values are valid, so they must be kept. It does not introduce a new invalid-value rule. Explicit negative mixing values and unset-sentinel handling will be addressed by a subsequent unified parameter-validity validation stage tracked in #7719; that work is outside this PR.
Linked Issue
Part of #7719. Independent of the other reset-cleanup PRs.
Unit Tests and/or Case Tests for my changes
Commands run with the GNU 13.4 conda toolchain on PATH,
LD_LIBRARY_PATH=/home/stardust/miniconda3/envs/phono3py/lib, andOMP_NUM_THREADS=1:Build and both CTest targets passed. Before applying the fix, the new
PreserveExplicitMagneticMixingregression failed for both overwritten values atnspin=2/4; the default-value regression already passed. After the fix, the full reader tests preserve0.2/0.7with omitted or explicitmixing_beta, includingnspin=1controls. Omitted magnetic parameters still resolve to1.6/0fornspin=2/4.--check-inputpassed in all nine case directories (nspin=1/2/4, default input or custom magnetic parameters with implicit/explicitmixing_beta). Exact retained values are asserted by the reader unit tests. Version isv3.11.0-beta11; both help pages and generated documentation contain the new guidance (579 parameters, 37 categories). An initial CTest invocation without the toolchain PATH failed to locatectest; the corrected invocation above passed. MPI/GPU and numerical LCAO runs were not performed; local validation uses the CPU/OpenMP build with MPI/LCAO backends disabled.What's changed?
mixing_betadefault hook. Magnetic defaults remain in their own existing initializer/hook.mixing_beta_magandmixing_gg0_magmetadata.Governance Notes
mixing_betais omitted. No documentation update required outside theInput_Itemregistrations; generated YAML/Markdown are build artifacts.git diff --cached --checkandpython3 tools/03_code_analysis/agent_governance_check.py --staged --event-path /mnt/g/work/agent/abacus/issue-7719-pr-notes/mixing-event.json --format textpassed. Whole-file quality scores remain 0/0 (baseline 0/0), reflecting existing large-file debt; the test additions increase test-file length.