replace read_wfc_lcao with an explicit two-value init_wfc syntax: init_wfc file txt and init_wfc file binary
keep the existing init_wfc method field internally while storing the normalized file format separately, so existing PW, LCAO, TDDFT, LR, and EXX flow checks remain stable
retain the legacy one-value init_wfc file input for backward compatibility (LCAO defaults to text, PW defaults to binary) while canonicalizing INPUT.info to the explicit two-value form
read the native out_wfc_lcao 2 layout for Gamma-only and multi-k calculations, including type conversion and file/index/dimension validation
generate binary fixtures at test runtime with the existing writer and cover double, float, complex, skipped bands, mismatched formats, truncated input, and existing text input
Input behavior
LCAO accepts init_wfc file txt and init_wfc file binary.
PW accepts init_wfc file binary and rejects init_wfc file txt because no PW text reader exists.
The selected format is used directly, with no automatic detection or fallback.
User documentation and CLI help show only the explicit two-value file syntax.
Binary compatibility
The reader intentionally follows the existing native int/double writer protocol. It does not add magic/version fields or cross-ABI, cross-endian compatibility, and it does not read files accumulated with out_app_flag.
Verification
cmake --build build -j2 (full serial build passed)
OMP_NUM_THREADS=1 ctest --test-dir /tmp/abacus_wfc_binary_mpi_mpicxx --output-on-failure -R '^(MODULE_IO_read_item_serial|MODULE_IO_write_wfc_nao|MODULE_IO_write_wfc_nao_para|MODULE_IO_read_wfc_nao_test|MODULE_IO_read_wfc_nao_test_parallel)$' (5/5 passed, including 2-rank MPI outside the restricted sandbox)
OMP_NUM_THREADS=1 two-stage end-to-end runs passed for text Gamma, binary Gamma, and binary 8-k-point LCAO wavefunctions; source/readback energies differed by at most 5.5e-13 eV
legacy one-value LCAO input read the text file successfully and wrote init_wfc file txt to INPUT.info
OMP_NUM_THREADS=1 ./build/abacus_basic_omp --check-input: PW file binary passed; PW file txt failed with the expected unsupported-format error
./build/abacus_basic_omp -h init_wfc: only the explicit file txt and file binary forms are documented
./build/abacus_basic_omp -h read_wfc_lcao: returned Unknown parameter
regenerated docs/parameters.yaml and docs/advanced/input_files/input-main.md; a fresh YAML generation matched byte-for-byte
git diff --check
python3 tools/03_code_analysis/agent_governance_check.py --staged (no findings)
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
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
Input behavior
Binary compatibility
The reader intentionally follows the existing native int/double writer protocol. It does not add magic/version fields or cross-ABI, cross-endian compatibility, and it does not read files accumulated with out_app_flag.
Verification
#6206