Skip to content

Support binary LCAO wavefunction input - #7863

Open
goodchong wants to merge 1 commit into
deepmodeling:developfrom
goodchong:codex/lcao-binary-wfc-read
Open

Support binary LCAO wavefunction input#7863
goodchong wants to merge 1 commit into
deepmodeling:developfrom
goodchong:codex/lcao-binary-wfc-read

Conversation

@goodchong

@goodchong goodchong commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add read_wfc_lcao to select text (1) or binary (2) LCAO wavefunction input without format detection or fallback
  • read the native out_wfc_lcao 2 layout for Gamma-only and multi-k calculations, including type conversion and file/index/dimension validation
  • pass the selected format through LCAO, TDDFT, and LR readers and document the input/output workflow
  • 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

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 --target abacus_basic_omp -j2
  • OMP_NUM_THREADS=1 ctest --test-dir /tmp/abacus_wfc_binary_mpi_mpicxx --output-on-failure -R 'MODULE_IO_(read_item_serial|read_wfc_nao_test|write_wfc_nao)' (5/5 passed, including 2-rank MPI)
  • Gamma-only and 8-k-point out_wfc_lcao 2 -> read_wfc_lcao 2 end-to-end runs with OMP_NUM_THREADS=1
  • ./build/abacus_basic_omp -h read_wfc_lcao
  • ./build/abacus_basic_omp --check-input for both end-to-end inputs
  • regenerated docs/parameters.yaml and docs/advanced/input_files/input-main.md; fresh generation matches both files
  • git diff --check
  • python3 tools/03_code_analysis/agent_governance_check.py --staged --format text

#6206

@mohanchen mohanchen added Refactor Refactor ABACUS codes Input&Output Suitable for coders without knowing too many DFT details labels Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Input&Output Suitable for coders without knowing too many DFT details Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants