Skip to content

Conversation

@ZhouXY-PKU
Copy link
Owner

Reminder

  • Have you linked an issue with this pull request?
  • Have you added adequate unit tests and/or case tests for your pull request?
  • Have you noticed possible changes of behavior below or in the linked issue?
  • Have you explained the changes of codes in core modules of ESolver, HSolver, ElecState, Hamilt, Operator or Psi? (ignore if not applicable)

Linked Issue

Fix #...

Unit Tests and/or Case Tests for my changes

  • A unit test is added for each new feature or bug fix.

What's changed?

  • Example: My changes might affect the performance of the application under certain conditions, and I have tested the impact on various scenarios...

Any changes of core modules? (ignore if not applicable)

  • Example: I have added a new virtual function in the esolver base class in order to ...

ZhouXY-PKU and others added 30 commits October 24, 2025 12:17
* Update update_cell.cpp to avoid numerical precision error issues.

* Update version to v3.9.0.17

* Update version to 3.9.0.17

Ready to release v3.9.0.17.

* Update version to 3.9.0.17

Ready to release v3.9.0.17.

* Update version to 3.9.0.17

Ready to release v3.9.0.17.

* Update version to 3.9.0.17

Ready to release v3.9.0.17.

* Update version to 3.9.0.17

Ready to release v3.9.0.17.
* Test: Decoupling test for out_chg and dft_functional

* Test: Turn off out_chg for inrelevant tests

* Test: Add 33_OF_out_chg
* Test: Fix version_check.yml

* Test: Fix FindMKL.cmake, which causes *** No rule to make target 'mkl_scalapack_lp64', needed by 'abacus'.  when compiling with intel.
* add update_pot in source_estate

* split update_pot in rt-TDDFT into two functions, one is the original update_pot, which is replaced by update_pot function in estate, the other is save2 function used in after_iter

* fix bugs

* update

* update esolver_ks

* small updates

* small bug fixed

* update E_bandgap to E_gap(k)

* delete rho_restart file

* change setup_parameters to print_parameters

* move setup_pw.cpp to setup_pwwfc.cpp in module_pwdft

* update esolver, small things

* delete some old_gint codes in esolver

* fix bugs, update outputs

* fix bug in tests

* change efermi to Efermi in fp_energy.h

* fix bugs

* fix exd and exc in ctrl_runner_lcao

* fix cmake

* fix bug

* delete lcao_after_scf and lcao_before_scf

* modify codes including read_wfc_nao to delete pelec, add setup_psi_lcao codes

* fix bugs

* delete grid integral in FORCE_STRESS

* move read psi to esolver, not in psi

* fix system bug

* fix bug in read_wfc_nao.h

* change PARAM.inp to inp

* fix bugs

* delete omega in pelec, remove some deepks codes to setup_deepks.cpp

* remove exx redundant parameters in Hamilt_LCAO

* Fix circular dependencies of header files.

* fix bugs in MLALGO

* refactor exx lcao

* add rho_tau_lcao files

* fix bug in setup_deepks

* move rho_tau_lcao to source_lcao

* remove old psiToRho function in elecstate_lcao and replace with new rho_tau_lcao

* update estate

* fix bug in ELF

* fix bug

* Update esolver_dm2rho.cpp
* Update update_cell.cpp to avoid numerical precision error issues.

* Update version to v3.9.0.17

* Update version to 3.9.0.17

Ready to release v3.9.0.17.

* Update version to 3.9.0.17

Ready to release v3.9.0.17.

* Update version to 3.9.0.17

Ready to release v3.9.0.17.

* Update version to 3.9.0.17

Ready to release v3.9.0.17.

* Update version to 3.9.0.17

Ready to release v3.9.0.17.

* Add include for elecstate_lcao in edm.cpp
* Standardize the declarations of BLAS functions in blas_connector_vector

* standardize the declarations of LAPACK functions

* add some comments

* fix some error

* Restore the mistakenly removed const
* Fix: remove rwork from ssyevx function declaration

* Fix: remove rwork parameter from heevx function call

---------

Co-authored-by: Kai Luo <kluophysics@gmail.com>
* Very good unit test, making my laptop fan spin

* Change default pexsi_npole from 80 to 40

* Place pexsi_EDM in DensityMatrix, set size of pexsi_dm = 1 when GlobalV::NSPIN==4, and add comments for dmToRho

* An unit test added for DiagoPexsi

* modify for changed gint interface

* correct nspin related behaviors

* add efermi passthrough

* Revert "add efermi passthrough"

This reverts commit d7b402d.

* commits to resolve conversations related to codes

* DM and EDM pointers in pexsi now handled by diagopexsi, and copying h s matrices no longer needed

* add pexsi examples

* fix pexsi unit test (original version shouldn't run)

* add building docs for pexsi

* set cxx standard to c++14, which is required in make_unique

* Fix: Fix typo related to pexsi

* update to PPEXSIDFTDriver2

* default npoints to 1, so single core pexsi will work

* Feature: exx operator for pw basis, single kpt

* apply pexsi changes(?)

* q-e style exx_div

* Correct exxdiv

* Fix Compile errors

* refactor to abandon `pdiagh`

* Fix mu_buffer and nspin

* HSE examples

* Feature: Multi-K exx

* Feature: Multi-K exx

* Updates with latest

* Remove redundant global vars

* Update to v3.9.0

* Update to v3.9.0, now code works

* Remove Redundant cal_exx_energy in esolver_ks_pw.cpp

* Some mess

* Minor Fixes

* Fix separate loop and screening

* Add EXX stress

* EXX Energy???

* Multi-K is broken???

* Fix: Multi-K and stress

* Feature: ACE for single-K

* Feature: ACE should work for multi-K, but not for sure

* Feature: ACE works. Next step is ACE energy.

* Fix: adapt to the latest instruction for variable `conv_esolver`

* Reconstruct: move exx_helper to hamilt_pwdft

* Refactor: in ESolver_KS_PW, calculate deband in iter_finish, not in hamilt2density

* Fix: make files in consistent with upstream

* Fix: Now EXX PW doesn't depend on LibRI

* Fix: Add input constraints for EXX PW

* Fix: Remove redundant mpi barrier

* Fix: Clean irrelevant files

* Fix: Clean irrelevant files

* Feature: add ace flag, exit on using gpu

* Refactor: Phase 1 for refactoring exx energy

* Feature: now ace calculates energy

* Feature: enable exx energy

* Fix: fix makefile compilation error

* Fix: One minor fix for a segmentation fault

* Tests: one integrate test for exx pw, only for verifying whether exx pw works

* Revert "Tests: one integrate test for exx pw, only for verifying whether exx pw works"

This reverts commit e7b606f.

* Fix: EXX PW ACE open only when separate_loop is on

* add timer

* Feature: Double Grid method of EXX PW

* Feature: Double Grid method of EXX PW Stress

* Fix: Double Grid method of EXX PW Stress

* Feature: add double grid variable

* Feature: add double grid variable

* Fis: HSE stress

* Fix: HSE Stress

* Fix: Timer

* Fix: Timer

* For non mp sampling, disable extrapolation

* Modify test

* Modify mp

* Format

* Format

* Feature: nspin == 2 scf

* Fix: nspin == 2 scf

* Docs: EXX PW Docs

* Feature: EXX PW for nspin=2

* Docs: EXX PW Docs

* Docs: EXX PW Docs

* Docs: EXX PW Docs, minor fixes

* Refactor

* Refactor

* Refactor

* Refactor

* Refactor

* Refactor: fix unit test

* Refactor: fix unit test

* Refactor: fix unit test

* Refactor: fix unit test

* Bump version v3.9.0.7

* Refactor: Remove set kvec funcs in `K_Vectors`

* Refactor: Remove final_scf

* Refactor: Fix kvecc2d/d2c

* Fix: Tests

* Fix: Tests

* Fix: Tests

* Fix: Tests

* Refactor: Final?

* Fix

* Fix

* Fix

* Fix

* GPU EXX PW Support

* Fix: Compile Error on CUDA > 12.9

* Fix: Compile Error on CUDA > 12.9

* NVTX3

* F***ing new version

* Feature: Support linear combination of coulomb_param for EXX PW

* Fix: Fix compile issue

* F***ing new version

* F***ing new version

* F***ing new version

* Uploading hybrid gauge tddft (#6369)

* hybrid gague

* update tests

* update

* update

* update

* update

* update unit test

* fix tests

* update tests

* fix read_wfc

* fix catch_properties.sh

* fix restart

* update gpu test

* update tests

* fix

* fix input_conv

* Improve md calculation stress output in running log (#6366)

* Improve md calculation stress output in running log

* Module_IO Unittest modify

* ModuleMD Unittests modify

* modify code comment in fire_test.cpp

* maintain setprecision(8) for md stress output

* Refactor: Remove redundant Input_para from ESolver Class (#6370)

* Refactor: Replace PARAM.inp with inp in ESolver classes for consistency

* Refactor: Replace local input parameters with PARAM.inp in ESolver classes for consistency

* Refactor: Use PARAM.inp.scf_ene_thr in ESolver_KS_LCAO iter_finish method

* Revert "Refactor: Use PARAM.inp.scf_ene_thr in ESolver_KS_LCAO iter_finish method"

This reverts commit b1bd0fd.

* Revert "Refactor: Replace local input parameters with PARAM.inp in ESolver classes for consistency"

This reverts commit f4f81e3.

* Fix: Fix memory leak introduced by new gint module (#6375)

* fix memory leak

* delete copy assignment

* refactor Exx_Opt_Orb (#6378)

Co-authored-by: linpz <linpz@mail.ustc.edu.cn>

* Add use sw and fix Floating point exception  (#6372)

* remove float error in sunway

* fix ig=0

* add the sw

* change the make_dir

* unify the gg use

* fix compile bug

* add init

* temporarily remove the sunway define

* add the pesduo

* fix compile bug

* fix bug in the betar

* modify the test

* Update the output formats of rt-TDDFT (#6381)

* update the output formats of rt-TDDFT

* update the output formats of rt-TDDFT

* fix a bug

* update initialized velocities

* found some output information is still lacking in MD module

* [Refactor] Rename grid to module_grid and genelpa to module_genelpa (#6386)

* Rename grid to module_grid

* Rename genelpa to module_genelpa

* Fix cmake

* Update the outputs of geometry relaxation (#6387)

* update the output formats of rt-TDDFT

* update the output formats of rt-TDDFT

* fix a bug

* update initialized velocities

* found some output information is still lacking in MD module

* update output information

* remove some global variables in relax_driver

* update outputs

* update relaxation outputs

* update relaxation output messages

* update tests of print info

* fix a test

* fix cg outputs

* udpate cg test

* update relax tests

* update LCAO output stress format

* change update_cell.cpp algorithm, when the ion move is larger than the cell length, it is fine to proceed the relaxation calculations

* fix tests for unitcells

* update cell

* Feature: support the output of matrix representation of symm_ops (#6390)

* Feature: support output the matrix representation of symmetry operation

* Feature: support the output of matrix representation of symm_ops

* update the document

* Feature: Output real space wavefunction and partial charge density when `device=gpu` (#6391)

* Fix GPU output of out_pchg and out_wfc_norm, out_wfc_re_im

* GPU integrate test is functional again

* Optimize RT-TDDFT dipole output (#6393)

* Perf: support GPU version of cal_force_cc with LCAO basis (#6392)

* support GPU version of cal_force_cc with LCAO basis

* fix a bug

* [Refactor] Move module_lr to source_lcao and add a new folder module_external in source_base (#6388)

* Move module_lr to source_lcao

* Fix test build

* Move blas_connector to module_external

* Fix header use

* Fix internal header use

* A fierce battle with Makefile😡

* Move blacs_connector.h to module_external

* Move lapack_connector.h and lapack_wrapper.h to module_external

* Fix header usage

* Move scalapack_connector.h to module_external

* Fix a bug for the output information after relaxation (#6395)

* update the output formats of rt-TDDFT

* update the output formats of rt-TDDFT

* fix a bug

* update initialized velocities

* found some output information is still lacking in MD module

* update output information

* remove some global variables in relax_driver

* update outputs

* update relaxation outputs

* update relaxation output messages

* update tests of print info

* fix a test

* fix cg outputs

* udpate cg test

* update relax tests

* update LCAO output stress format

* change update_cell.cpp algorithm, when the ion move is larger than the cell length, it is fine to proceed the relaxation calculations

* fix tests for unitcells

* update cell

* update some function names, update output A to Angstrom

* change eV/A to eV/Angstrom

* bump version to 3.9.0.10 (#6397)

Co-authored-by: Liang Sun <50293369+sunliang98@users.noreply.github.com>

* Fix: fix exx_gamma_extrapolation error in MPI

* Fix: fix exx_gamma_extrapolation error in MPI

* Update lapack.cu

* Refactor: Use LAPACK interfaces from ATen

* Fix: Integrate test

* Fix: implement devinfo for potrf

* Fix: MPI and Makefile

* Fix: get_potential

* Fix: ace

* Refactor

* Refactor

* Refactor

* Refactor

* Refactor

* Fix: conv

* Revert "Fix: conv"

This reverts commit d2da506.

* Fix: conv

* Fix: conv hard code thr for now

* Fix: conv hard code thr for now

* Fix: conv hard code thr for now

* Fix: conv hard code thr for now

* Refactor

* Refactor

* Refactor

* Refactor

* Refactor

* Mod

* Begin EXX KPAR

* Begin EXX KPAR

* Begin EXX KPAR

* Begin EXX KPAR

* Begin EXX KPAR

* EXX KPAR WORKS

* EXX KPAR WORKS Alternative

* Fix GPU, but so ugly...

* Undo cuda aware mpi

* Undo cuda aware mpi

* Revert "Undo cuda aware mpi"

This reverts commit a8d71b2.

* EXX KPAR WORKS on NSPIN=2

* Fix without MPI

* Fix header

---------

Co-authored-by: Mohan Chen <mohan.chen.chen.mohan@gmail.com>
Co-authored-by: wqzhou <33364058+WHUweiqingzhou@users.noreply.github.com>
Co-authored-by: HTZhao <104255052+ESROAMER@users.noreply.github.com>
Co-authored-by: lanshuyue <140165754+lanshuyue@users.noreply.github.com>
Co-authored-by: Liang Sun <50293369+sunliang98@users.noreply.github.com>
Co-authored-by: dzzz2001 <153698752+dzzz2001@users.noreply.github.com>
Co-authored-by: linpeize <linpeize2024@163.com>
Co-authored-by: linpz <linpz@mail.ustc.edu.cn>
Co-authored-by: liiutao <74701833+A-006@users.noreply.github.com>
Co-authored-by: Mohan Chen <mohanchen@pku.edu.cn>
Co-authored-by: Critsium <tsfxwbbzxy@163.com>
Co-authored-by: kirk0830 <67682086+kirk0830@users.noreply.github.com>
Co-authored-by: Taoni Bao <baotaoni@pku.edu.cn>
Co-authored-by: Chen Nuo <49788094+Cstandardlib@users.noreply.github.com>
…earch_radius in neighboring search tasks carried in `out_mat_l` (#6653)

* Fix: adjust neighbor search loop condition in AngularMomentumCalculator

* Fix: adjust search_radius handling and improve neighbor search in AngularMomentumCalculator
* An unit test added for DiagoPexsi

* modify for changed gint interface

* correct nspin related behaviors

* add efermi passthrough

* Revert "add efermi passthrough"

This reverts commit d7b402d.

* commits to resolve conversations related to codes

* DM and EDM pointers in pexsi now handled by diagopexsi, and copying h s matrices no longer needed

* add pexsi examples

* fix pexsi unit test (original version shouldn't run)

* add building docs for pexsi

* set cxx standard to c++14, which is required in make_unique

* Fix: Fix typo related to pexsi

* update to PPEXSIDFTDriver2

* default npoints to 1, so single core pexsi will work

* Feature: exx operator for pw basis, single kpt

* apply pexsi changes(?)

* q-e style exx_div

* Correct exxdiv

* Fix Compile errors

* refactor to abandon `pdiagh`

* Fix mu_buffer and nspin

* HSE examples

* Feature: Multi-K exx

* Feature: Multi-K exx

* Updates with latest

* Remove redundant global vars

* Update to v3.9.0

* Update to v3.9.0, now code works

* Remove Redundant cal_exx_energy in esolver_ks_pw.cpp

* Some mess

* Minor Fixes

* Fix separate loop and screening

* Add EXX stress

* EXX Energy???

* Multi-K is broken???

* Fix: Multi-K and stress

* Feature: ACE for single-K

* Feature: ACE should work for multi-K, but not for sure

* Feature: ACE works. Next step is ACE energy.

* Fix: adapt to the latest instruction for variable `conv_esolver`

* Reconstruct: move exx_helper to hamilt_pwdft

* Refactor: in ESolver_KS_PW, calculate deband in iter_finish, not in hamilt2density

* Fix: make files in consistent with upstream

* Fix: Now EXX PW doesn't depend on LibRI

* Fix: Add input constraints for EXX PW

* Fix: Remove redundant mpi barrier

* Fix: Clean irrelevant files

* Fix: Clean irrelevant files

* Feature: add ace flag, exit on using gpu

* Refactor: Phase 1 for refactoring exx energy

* Feature: now ace calculates energy

* Feature: enable exx energy

* Fix: fix makefile compilation error

* Fix: One minor fix for a segmentation fault

* Tests: one integrate test for exx pw, only for verifying whether exx pw works

* Revert "Tests: one integrate test for exx pw, only for verifying whether exx pw works"

This reverts commit e7b606f.

* Fix: EXX PW ACE open only when separate_loop is on

* add timer

* Feature: Double Grid method of EXX PW

* Feature: Double Grid method of EXX PW Stress

* Fix: Double Grid method of EXX PW Stress

* Feature: add double grid variable

* Feature: add double grid variable

* Fis: HSE stress

* Fix: HSE Stress

* Fix: Timer

* Fix: Timer

* For non mp sampling, disable extrapolation

* Modify test

* Modify mp

* Format

* Format

* Feature: nspin == 2 scf

* Fix: nspin == 2 scf

* Docs: EXX PW Docs

* Feature: EXX PW for nspin=2

* Docs: EXX PW Docs

* Docs: EXX PW Docs

* Docs: EXX PW Docs, minor fixes

* Refactor

* Refactor

* Refactor

* Refactor

* Refactor

* Refactor: fix unit test

* Refactor: fix unit test

* Refactor: fix unit test

* Refactor: fix unit test

* Bump version v3.9.0.7

* Refactor: Remove set kvec funcs in `K_Vectors`

* Refactor: Remove final_scf

* Refactor: Fix kvecc2d/d2c

* Fix: Tests

* Fix: Tests

* Fix: Tests

* Fix: Tests

* Refactor: Final?

* Fix

* Fix

* Fix

* Fix

* GPU EXX PW Support

* Fix: Compile Error on CUDA > 12.9

* Fix: Compile Error on CUDA > 12.9

* NVTX3

* F***ing new version

* Feature: Support linear combination of coulomb_param for EXX PW

* Fix: Fix compile issue

* F***ing new version

* F***ing new version

* F***ing new version

* Uploading hybrid gauge tddft (#6369)

* hybrid gague

* update tests

* update

* update

* update

* update

* update unit test

* fix tests

* update tests

* fix read_wfc

* fix catch_properties.sh

* fix restart

* update gpu test

* update tests

* fix

* fix input_conv

* Improve md calculation stress output in running log (#6366)

* Improve md calculation stress output in running log

* Module_IO Unittest modify

* ModuleMD Unittests modify

* modify code comment in fire_test.cpp

* maintain setprecision(8) for md stress output

* Refactor: Remove redundant Input_para from ESolver Class (#6370)

* Refactor: Replace PARAM.inp with inp in ESolver classes for consistency

* Refactor: Replace local input parameters with PARAM.inp in ESolver classes for consistency

* Refactor: Use PARAM.inp.scf_ene_thr in ESolver_KS_LCAO iter_finish method

* Revert "Refactor: Use PARAM.inp.scf_ene_thr in ESolver_KS_LCAO iter_finish method"

This reverts commit b1bd0fd.

* Revert "Refactor: Replace local input parameters with PARAM.inp in ESolver classes for consistency"

This reverts commit f4f81e3.

* Fix: Fix memory leak introduced by new gint module (#6375)

* fix memory leak

* delete copy assignment

* refactor Exx_Opt_Orb (#6378)

Co-authored-by: linpz <linpz@mail.ustc.edu.cn>

* Add use sw and fix Floating point exception  (#6372)

* remove float error in sunway

* fix ig=0

* add the sw

* change the make_dir

* unify the gg use

* fix compile bug

* add init

* temporarily remove the sunway define

* add the pesduo

* fix compile bug

* fix bug in the betar

* modify the test

* Update the output formats of rt-TDDFT (#6381)

* update the output formats of rt-TDDFT

* update the output formats of rt-TDDFT

* fix a bug

* update initialized velocities

* found some output information is still lacking in MD module

* [Refactor] Rename grid to module_grid and genelpa to module_genelpa (#6386)

* Rename grid to module_grid

* Rename genelpa to module_genelpa

* Fix cmake

* Update the outputs of geometry relaxation (#6387)

* update the output formats of rt-TDDFT

* update the output formats of rt-TDDFT

* fix a bug

* update initialized velocities

* found some output information is still lacking in MD module

* update output information

* remove some global variables in relax_driver

* update outputs

* update relaxation outputs

* update relaxation output messages

* update tests of print info

* fix a test

* fix cg outputs

* udpate cg test

* update relax tests

* update LCAO output stress format

* change update_cell.cpp algorithm, when the ion move is larger than the cell length, it is fine to proceed the relaxation calculations

* fix tests for unitcells

* update cell

* Feature: support the output of matrix representation of symm_ops (#6390)

* Feature: support output the matrix representation of symmetry operation

* Feature: support the output of matrix representation of symm_ops

* update the document

* Feature: Output real space wavefunction and partial charge density when `device=gpu` (#6391)

* Fix GPU output of out_pchg and out_wfc_norm, out_wfc_re_im

* GPU integrate test is functional again

* Optimize RT-TDDFT dipole output (#6393)

* Perf: support GPU version of cal_force_cc with LCAO basis (#6392)

* support GPU version of cal_force_cc with LCAO basis

* fix a bug

* [Refactor] Move module_lr to source_lcao and add a new folder module_external in source_base (#6388)

* Move module_lr to source_lcao

* Fix test build

* Move blas_connector to module_external

* Fix header use

* Fix internal header use

* A fierce battle with Makefile😡

* Move blacs_connector.h to module_external

* Move lapack_connector.h and lapack_wrapper.h to module_external

* Fix header usage

* Move scalapack_connector.h to module_external

* Fix a bug for the output information after relaxation (#6395)

* update the output formats of rt-TDDFT

* update the output formats of rt-TDDFT

* fix a bug

* update initialized velocities

* found some output information is still lacking in MD module

* update output information

* remove some global variables in relax_driver

* update outputs

* update relaxation outputs

* update relaxation output messages

* update tests of print info

* fix a test

* fix cg outputs

* udpate cg test

* update relax tests

* update LCAO output stress format

* change update_cell.cpp algorithm, when the ion move is larger than the cell length, it is fine to proceed the relaxation calculations

* fix tests for unitcells

* update cell

* update some function names, update output A to Angstrom

* change eV/A to eV/Angstrom

* bump version to 3.9.0.10 (#6397)

Co-authored-by: Liang Sun <50293369+sunliang98@users.noreply.github.com>

* Fix: fix exx_gamma_extrapolation error in MPI

* Fix: fix exx_gamma_extrapolation error in MPI

* Update lapack.cu

* Refactor: Use LAPACK interfaces from ATen

* Fix: Integrate test

* Fix: implement devinfo for potrf

* Fix: MPI and Makefile

* Fix: get_potential

* Fix: ace

* Refactor

* Refactor

* Refactor

* Refactor

* Refactor

* Fix: conv

* Revert "Fix: conv"

This reverts commit d2da506.

* Fix: conv

* Fix: conv hard code thr for now

* Fix: conv hard code thr for now

* Fix: conv hard code thr for now

* Fix: conv hard code thr for now

* Refactor

* Refactor

* Refactor

* Refactor

* Refactor

* Mod

* Begin EXX KPAR

* Begin EXX KPAR

* Begin EXX KPAR

* Begin EXX KPAR

* Begin EXX KPAR

* EXX KPAR WORKS

* EXX KPAR WORKS Alternative

* Fix GPU, but so ugly...

* Undo cuda aware mpi

* Undo cuda aware mpi

* Revert "Undo cuda aware mpi"

This reverts commit a8d71b2.

* EXX KPAR WORKS on NSPIN=2

* Fix without MPI

* Fix header

* Separate ecut for exx pw

* Documents related

* Documents related

---------

Co-authored-by: Mohan Chen <mohan.chen.chen.mohan@gmail.com>
Co-authored-by: wqzhou <33364058+WHUweiqingzhou@users.noreply.github.com>
Co-authored-by: HTZhao <104255052+ESROAMER@users.noreply.github.com>
Co-authored-by: lanshuyue <140165754+lanshuyue@users.noreply.github.com>
Co-authored-by: Liang Sun <50293369+sunliang98@users.noreply.github.com>
Co-authored-by: dzzz2001 <153698752+dzzz2001@users.noreply.github.com>
Co-authored-by: linpeize <linpeize2024@163.com>
Co-authored-by: linpz <linpz@mail.ustc.edu.cn>
Co-authored-by: liiutao <74701833+A-006@users.noreply.github.com>
Co-authored-by: Mohan Chen <mohanchen@pku.edu.cn>
Co-authored-by: Critsium <tsfxwbbzxy@163.com>
Co-authored-by: kirk0830 <67682086+kirk0830@users.noreply.github.com>
Co-authored-by: Taoni Bao <baotaoni@pku.edu.cn>
Co-authored-by: Chen Nuo <49788094+Cstandardlib@users.noreply.github.com>
* Remove redundant includes in RT-TDDFT

* Refactor store_h_s_psi

* Refactor Hk and Sk with Tensor

* Refactor MPI utility functions

* Refactor gather and distribute Psi function

* Modify the output suffix of some text files from .dat to .txt

* Change dipole file name from SPIN*_DIPOLE to dipole_s*.txt

* Move the output functions in after_scf to ctrl_output_td

* Only calculate EDM in RT-TDDFT when the electronic step ends

* Fix MPI bug

* Fix LCAO macro bug
* Simplify functions in sparse_format.

* Add template support for output HSR.
* Fix a bug.

* Move deepks_projdm.dat out from OUT.autotest/.

* Add a input shape check for DeePKS model.
* add update_pot in source_estate

* split update_pot in rt-TDDFT into two functions, one is the original update_pot, which is replaced by update_pot function in estate, the other is save2 function used in after_iter

* fix bugs

* update

* update esolver_ks

* small updates

* small bug fixed

* update E_bandgap to E_gap(k)

* delete rho_restart file

* change setup_parameters to print_parameters

* move setup_pw.cpp to setup_pwwfc.cpp in module_pwdft

* update esolver, small things

* delete some old_gint codes in esolver

* fix bugs, update outputs

* fix bug in tests

* change efermi to Efermi in fp_energy.h

* fix bugs

* fix exd and exc in ctrl_runner_lcao

* fix cmake

* fix bug

* delete lcao_after_scf and lcao_before_scf

* modify codes including read_wfc_nao to delete pelec, add setup_psi_lcao codes

* fix bugs

* delete grid integral in FORCE_STRESS

* move read psi to esolver, not in psi

* fix system bug

* fix bug in read_wfc_nao.h

* change PARAM.inp to inp

* fix bugs

* delete omega in pelec, remove some deepks codes to setup_deepks.cpp

* remove exx redundant parameters in Hamilt_LCAO

* Fix circular dependencies of header files.

* fix bugs in MLALGO

* refactor exx lcao

* add rho_tau_lcao files

* fix bug in setup_deepks

* move rho_tau_lcao to source_lcao

* remove old psiToRho function in elecstate_lcao and replace with new rho_tau_lcao

* update estate

* fix bug in ELF

* fix bug

* move DM outside of pelec

* deal with init_dm functions

* remove pelec in dftu, replace with dmk_d(ouble) and dmk_c(omplex)

* fix cal_ldos with DM

* update delta_spin

* update delta spin run_lambda_loop

* the big issue to remove dm may be caused by cal_mw_from_lambda

* remove some DM

* keep updating DM

* refactor some DM in double_xc

* now all functions can be compiled

* fix it

* update again

* add and compile setup_dm

* update fix bugs

* simplify dm

* one more fix

* now I can compile the code

* fix some bugs in EXX version

* fix FORCE_STRESS

* fix 2

* fix 3

* fix 4

* fix 5

* improve esolver_ks_lcao

* improve again

* comment out psi2rho in init_dm

* clean esolver_ks_lcao

* update structure_factor

* update sf

* update

* fix sf

* fix

* fix structure factor
…er. (#6677)

* Fix: Resolve the compilation error in the Intel oneAPI 2025.3 container.

* Fix: Turn off pexsi

* Update Dockerfile for abacus-develop configuration

* Update Dockerfile.intel

* Fix: Update CMakeLists.txt

* Fix: Update Dockerfile.intel and FindMKL.cmake

* Disable SYCL compiler detection for MKL

* Turn of MKL_SYCL_DISTRIBUTED_DFT

* Test: Turn off DMKL_SYCL and DMKL_SYCL_DISTRIBUTED_DFT

* Update Dockerfile.intel

* Remove intel-oneapi-mkl-devel-sycl from Dockerfile

Removed intel-oneapi-mkl-devel-sycl from installation.

* Update Intel oneAPI MKL installation and cleanup

* Remove SYCL distributed DFT option from MKL settings

Removed the option to disable SYCL distributed DFT in MKL settings.

* Since libmkl_sycl_distributed_dft.so can be correctly found, we try to turn on SYCL

* Update Dockerfile.intel to remove MKL_SYCL options

Removed MKL_SYCL and MKL_SYCL_DISTRIBUTED_DFT options from cmake command.

* Recover devcontainer.yml, and comment out `find_package(MKL NO_MODULE)` in FindMKL.cmake.

* Recover devcontainer.yml

---------

Co-authored-by: Levi Zhou <31941107+ZhouXY-PKU@users.noreply.github.com>
…calapackConnector and BlasConnector interfaces (#6687)
* Add blas_copy

* Add blas_nrm2

* Fix blas_nrm2 unittest

* Fix scnrm2_ return type

* Sort and classify lapack routines

* Add geqrf

* add geqrf lapack C interface

* geqrf_inplace with tests

* Comment test auxiliary code to be used later

* Add the description of cusolver_utils.h, temporarily disabled

* Update heevd interface to add lda

* Update lapack_test to new interface

---------

Co-authored-by: Mohan Chen <mohanchen@pku.edu.cn>
* add update_pot in source_estate

* split update_pot in rt-TDDFT into two functions, one is the original update_pot, which is replaced by update_pot function in estate, the other is save2 function used in after_iter

* fix bugs

* update

* update esolver_ks

* small updates

* small bug fixed

* update E_bandgap to E_gap(k)

* delete rho_restart file

* change setup_parameters to print_parameters

* move setup_pw.cpp to setup_pwwfc.cpp in module_pwdft

* update esolver, small things

* delete some old_gint codes in esolver

* fix bugs, update outputs

* fix bug in tests

* change efermi to Efermi in fp_energy.h

* fix bugs

* fix exd and exc in ctrl_runner_lcao

* fix cmake

* fix bug

* delete lcao_after_scf and lcao_before_scf

* modify codes including read_wfc_nao to delete pelec, add setup_psi_lcao codes

* fix bugs

* delete grid integral in FORCE_STRESS

* move read psi to esolver, not in psi

* fix system bug

* fix bug in read_wfc_nao.h

* change PARAM.inp to inp

* fix bugs

* delete omega in pelec, remove some deepks codes to setup_deepks.cpp

* remove exx redundant parameters in Hamilt_LCAO

* Fix circular dependencies of header files.

* fix bugs in MLALGO

* refactor exx lcao

* add rho_tau_lcao files

* fix bug in setup_deepks

* move rho_tau_lcao to source_lcao

* remove old psiToRho function in elecstate_lcao and replace with new rho_tau_lcao

* update estate

* fix bug in ELF

* fix bug

* move DM outside of pelec

* deal with init_dm functions

* remove pelec in dftu, replace with dmk_d(ouble) and dmk_c(omplex)

* fix cal_ldos with DM

* update delta_spin

* update delta spin run_lambda_loop

* the big issue to remove dm may be caused by cal_mw_from_lambda

* remove some DM

* keep updating DM

* refactor some DM in double_xc

* now all functions can be compiled

* fix it

* update again

* add and compile setup_dm

* update fix bugs

* simplify dm

* one more fix

* now I can compile the code

* fix some bugs in EXX version

* fix FORCE_STRESS

* fix 2

* fix 3

* fix 4

* fix 5

* improve esolver_ks_lcao

* improve again

* comment out psi2rho in init_dm

* clean esolver_ks_lcao

* update structure_factor

* update sf

* update

* fix sf

* fix

* fix structure factor

* fix dm bug in PEXSI

* fix PEXSI

* Update edm.cpp

* fix edm

* Update hsolver_lcao.cpp

* Update hsolver_lcao.cpp

---------

Co-authored-by: Levi Zhou <31941107+ZhouXY-PKU@users.noreply.github.com>
* [Fix]Install libraries for PEXSI and update abacus build

Added installation steps for GKlib, METIS, ParMETIS, SuperLU_DIST, and PEXSI in the Dockerfile. Updated the abacus build process to use a specific version.

* Update build arguments for Intel and GNU toolchains

* Update Dockerfile.intel

* Update elecstate_lcao.cpp

* Update Dockerfile.intel

* Update Dockerfile.intel

---------

Co-authored-by: Mohan Chen <mohanchen@pku.edu.cn>
Added #include <iostream> to fix compilation errors related to std::cout.
* add update_pot in source_estate

* split update_pot in rt-TDDFT into two functions, one is the original update_pot, which is replaced by update_pot function in estate, the other is save2 function used in after_iter

* fix bugs

* update

* update esolver_ks

* small updates

* small bug fixed

* update E_bandgap to E_gap(k)

* delete rho_restart file

* change setup_parameters to print_parameters

* move setup_pw.cpp to setup_pwwfc.cpp in module_pwdft

* update esolver, small things

* delete some old_gint codes in esolver

* fix bugs, update outputs

* fix bug in tests

* change efermi to Efermi in fp_energy.h

* fix bugs

* fix exd and exc in ctrl_runner_lcao

* fix cmake

* fix bug

* delete lcao_after_scf and lcao_before_scf

* modify codes including read_wfc_nao to delete pelec, add setup_psi_lcao codes

* fix bugs

* delete grid integral in FORCE_STRESS

* move read psi to esolver, not in psi

* fix system bug

* fix bug in read_wfc_nao.h

* change PARAM.inp to inp

* fix bugs

* delete omega in pelec, remove some deepks codes to setup_deepks.cpp

* remove exx redundant parameters in Hamilt_LCAO

* Fix circular dependencies of header files.

* fix bugs in MLALGO

* refactor exx lcao

* add rho_tau_lcao files

* fix bug in setup_deepks

* move rho_tau_lcao to source_lcao

* remove old psiToRho function in elecstate_lcao and replace with new rho_tau_lcao

* update estate

* fix bug in ELF

* fix bug

* move DM outside of pelec

* deal with init_dm functions

* remove pelec in dftu, replace with dmk_d(ouble) and dmk_c(omplex)

* fix cal_ldos with DM

* update delta_spin

* update delta spin run_lambda_loop

* the big issue to remove dm may be caused by cal_mw_from_lambda

* remove some DM

* keep updating DM

* refactor some DM in double_xc

* now all functions can be compiled

* fix it

* update again

* add and compile setup_dm

* update fix bugs

* simplify dm

* one more fix

* now I can compile the code

* fix some bugs in EXX version

* fix FORCE_STRESS

* fix 2

* fix 3

* fix 4

* fix 5

* improve esolver_ks_lcao

* improve again

* comment out psi2rho in init_dm

* clean esolver_ks_lcao

* update structure_factor

* update sf

* update

* fix sf

* fix

* fix structure factor

* update DFTU, remove GlobalC of DFTU

* remove some GlobalC

* remove GlobalC, rename ModuleDFTU::DFTU class to Plus_U

* keep updating DFTU

* fix +U forces and stress

* fix dm bug in PEXSI

* fix PEXSI

* Update edm.cpp

* fix edm

* Update hsolver_lcao.cpp

* Update hsolver_lcao.cpp

* keep removing dftu

* update dftu, remove GlobalC

* keep removing GlobalC::DFTU

* remove all GlobalC::dftu

* fix gpu +U

* fix tests related to removal of GlobalC::dftu

* fix again

* fix bug that ignoring pass dftu pointer

* update +U

* add output of DFT+U energy term

---------

Co-authored-by: Levi Zhou <31941107+ZhouXY-PKU@users.noreply.github.com>
dyzheng and others added 30 commits January 27, 2026 09:34
…ptimized doc (#6858)

* Feature&Doc: support fix_axes and fix_ibrav for relax_new=false

* Fix: UT error of fixed_axes
* Feature: support ELF with non-collinear spin (nspin = 4)

* fix: UT for write_elf
* Refactor: Encapsulate timer functionality in timer_wrapper.h

* Refactor timer code and clean_esolver function

1. Remove #ifdef __MPI from timer code, encapsulate in timer_wrapper.h
2. Move ESolver clean logic to after_all_runners method
3. Replace clean_esolver calls with direct delete p_esolver
4. Remove #ifdef __MPI from delete p_esolver
5. Add Cblacs_exit(1) in after_all_runners for LCAO calculations

* move exx_helper to module_pwdft

* rename pw files

* Refactor: Move and rename nonlocal_pw files to module_pwdft directory

* Refactor: Move and rename velocity_pw, veff_pw, and meta_pw files to module_pwdft directory

* Refactor: Move and rename all operator_pw files to module_pwdft directory and clean up

* Refactor: Rename stress_func_xxx files to stress_xxx by removing _func suffix

* Rename V*_in_pw files to more concise names and update references

This commit includes:
1. Renamed files in module_pwdft directory:
   - VL_in_pw.cpp/h → vl_pw.cpp/h
   - VNL_in_pw.cpp/h → vnl_pw.cpp/h
   - VNL_grad_pw.cpp → vnl_pw_grad.cpp
   - VSep_in_pw.cpp/h → vsep_pw.cpp/h

2. Updated CMakeLists.txt and Makefile.Objects to use new filenames

3. Updated include paths in 41 files across the codebase:
   - source_cell/test/klist_test.cpp and klist_test_para.cpp
   - source_esolver/esolver_fp.h, esolver_ks_pw.cpp, esolver_ks_pw.h
   - source_estate/module_pot/pot_sep.h, potential_new.h, setup_estate_pw.h
   - source_estate/test/elecstate_pw_test.cpp
   - source_io/test/for_testing_input_conv.h, for_testing_klist.h
   - source_lcao/LCAO_set.h
   - source_psi/psi_initializer.h and related files
   - source_pw/module_ofdft/of_stress_pw.h
   - source_pw/module_pwdft/* (multiple files)
   - source_pw/module_stodft/sto_stress_pw.h

4. Verified compilation success with make -j30

The renaming follows consistent naming conventions and makes filenames more concise.

* fix Makefile.Objects

* Fix CI/CD error: Update operator_pw paths to new op_pw locations

This commit fixes the CI/CD build error by updating references to the old operator_pw directory structure:

1. Updated source/source_hsolver/test/CMakeLists.txt:
   - Changed all 7 references from '../../source_pw/module_pwdft/operator_pw/operator_pw.cpp' to '../../source_pw/module_pwdft/op_pw.cpp'

2. Updated source/source_hsolver/test/diago_mock.h:
   - Changed '#include "source_pw/module_pwdft/operator_pw/operator_pw.h"' to '#include "source_pw/module_pwdft/op_pw.h"'

The operator_pw directory has been renamed and its files moved to the module_pwdft root directory with op_pw_ prefixes, so these path updates are necessary to ensure CI/CD builds succeed.

---------

Co-authored-by: abacus_fixer <mohanchen@pku.eud.cn>
…#6910)

* Fix: Hefei-NAMD interface of file syns_nao.csr and parameter cal_syns

* refactor: esolver to ctrl_scf_lcao
…add unit tests (#6917)

* add change

* add numrial fast

* add check for cal_bandgap Boundary

* Revert "add change"

This reverts commit 78444e9.

* add back mlago

* add back mlago format
* Refactor: Encapsulate timer functionality in timer_wrapper.h

* Refactor timer code and clean_esolver function

1. Remove #ifdef __MPI from timer code, encapsulate in timer_wrapper.h
2. Move ESolver clean logic to after_all_runners method
3. Replace clean_esolver calls with direct delete p_esolver
4. Remove #ifdef __MPI from delete p_esolver
5. Add Cblacs_exit(1) in after_all_runners for LCAO calculations

* Fix uninitialized variables in source_pw directory

This commit fixes 37 uninitialized variables (19 int, 18 double) in 19 files within the source_pw directory. All variables are initialized to 0 or 0.0 to prevent undefined behavior and improve code safety.

Affected files:
- source_stodft/sto_wf.cpp
- source_stodft/sto_tool.h
- source_stodft/sto_iter.h
- source_stodft/sto_iter.cpp
- source_stodft/sto_forces.cpp
- source_pwdft/stress_func_loc.cpp
- source_pwdft/soc.cpp
- source_pwdft/parallel_grid.cpp
- source_pwdft/onsite_projector.cpp
- source_pwdft/operator_pw/exx_pw_ace.cpp
- source_pwdft/onsite_proj_tools.h
- source_pwdft/nonlocal_maths.hpp
- source_pwdft/fs_nonlocal_tools.h
- source_pwdft/elecond.cpp
- source_pwdft/forces_cc.cpp
- source_pwdft/VNL_in_pw.cpp
- source_pwdft/forces_scc.cpp
- source_pwdft/forces.cpp
- source_pwdft/VNL_grad_pw.cpp

* Fix uninitialized variables in source_lcao directory

This commit fixes uninitialized variables (int and double) in 18 files within the source_lcao directory. All variables are initialized to 0 or 0.0 to prevent undefined behavior and improve code safety.

Affected files:
- spar_hsr.cpp, spar_dh.cpp
- wavefunc_in_pw.cpp
- module_rt/velocity_op.cpp, module_rt/norm_psi.cpp, module_rt/propagator.cpp, module_rt/td_folding.cpp, module_rt/boundary_fix.cpp
- module_ri/exx_abfs-io.cpp, module_ri/module_exx_symmetry/irreducible_sector_bvk.cpp, module_ri/module_exx_symmetry/symmetry_rotation.cpp
- module_lr/dm_trans/dmr_complex.cpp, module_lr/esolver_lrtd_lcao.cpp
- module_operator_lcao/dspin_force_stress.hpp, module_operator_lcao/dftu_force_stress.hpp
- module_hcontainer/func_folding.cpp, module_hcontainer/test/test_hcontainer.cpp
- module_gint/set_ddphi.cpp

* fix: initialize all uninitialized variables in source_relax and source_md

* fix: initialize all uninitialized variables in source_base

* fix: initialize all uninitialized variables in source_cell and source_estate

* fix: initialize all uninitialized variables in source_hsolver and source_io

* fix: initialize all uninitialized variables in source_lcao and source_psi

* fix some uninitalized variables

* move exx_helper to module_pwdft

* rename pw files

* Refactor: Move and rename nonlocal_pw files to module_pwdft directory

* Refactor: Move and rename velocity_pw, veff_pw, and meta_pw files to module_pwdft directory

* Refactor: Move and rename all operator_pw files to module_pwdft directory and clean up

* Refactor: Rename stress_func_xxx files to stress_xxx by removing _func suffix

* Rename V*_in_pw files to more concise names and update references

This commit includes:
1. Renamed files in module_pwdft directory:
   - VL_in_pw.cpp/h → vl_pw.cpp/h
   - VNL_in_pw.cpp/h → vnl_pw.cpp/h
   - VNL_grad_pw.cpp → vnl_pw_grad.cpp
   - VSep_in_pw.cpp/h → vsep_pw.cpp/h

2. Updated CMakeLists.txt and Makefile.Objects to use new filenames

3. Updated include paths in 41 files across the codebase:
   - source_cell/test/klist_test.cpp and klist_test_para.cpp
   - source_esolver/esolver_fp.h, esolver_ks_pw.cpp, esolver_ks_pw.h
   - source_estate/module_pot/pot_sep.h, potential_new.h, setup_estate_pw.h
   - source_estate/test/elecstate_pw_test.cpp
   - source_io/test/for_testing_input_conv.h, for_testing_klist.h
   - source_lcao/LCAO_set.h
   - source_psi/psi_initializer.h and related files
   - source_pw/module_ofdft/of_stress_pw.h
   - source_pw/module_pwdft/* (multiple files)
   - source_pw/module_stodft/sto_stress_pw.h

4. Verified compilation success with make -j30

The renaming follows consistent naming conventions and makes filenames more concise.

* fix Makefile.Objects

* Fix CI/CD error: Update operator_pw paths to new op_pw locations

This commit fixes the CI/CD build error by updating references to the old operator_pw directory structure:

1. Updated source/source_hsolver/test/CMakeLists.txt:
   - Changed all 7 references from '../../source_pw/module_pwdft/operator_pw/operator_pw.cpp' to '../../source_pw/module_pwdft/op_pw.cpp'

2. Updated source/source_hsolver/test/diago_mock.h:
   - Changed '#include "source_pw/module_pwdft/operator_pw/operator_pw.h"' to '#include "source_pw/module_pwdft/op_pw.h"'

The operator_pw directory has been renamed and its files moved to the module_pwdft root directory with op_pw_ prefixes, so these path updates are necessary to ensure CI/CD builds succeed.

* fix

* fix relax_sync.cpp

---------

Co-authored-by: abacus_fixer <mohanchen@pku.eud.cn>
…#6920)

* Refactor: rename to delete new from names of operators in source_lcao

* Fix: stress of nonlocal

* Fix: complining error

---------

Co-authored-by: dyzheng <zhengdy@bjaisi.com>
* Fix docs for init_chg

* Fix warning for init_chg

* Align format for pseudo warning
…educe (#6922)

* add parallel

* change function

* change use file

* fix add __MPI

* fix error

* fix unittest bug

* fix format

* add back MPI

* move back sdft

* add template

* fix compile bug
* change reduce_all and reduce_pool

* fix compile bug

* fix compute bug
* Fix: Remove the warning for cal_elf in NSPIN=4 case

* Refactor: Update the calculation of ELF for NSPIN=4 case.

* Doc: Update the documentation of out_elf

* Test: Add an integrate test `tests/03_NAO_multik/63_NO_KP_out_elf` for out_elf with NSPIN=4

* Fix: Update the annotation of write_elf

* Fix: Enhance the stability of write_elf for spin=2 case

* Test: update 63_NO_KP_out_elf

* Test: Reduce the cell length of 63_NO_KP_out_elf
* Refactor: Encapsulate timer functionality in timer_wrapper.h

* Refactor timer code and clean_esolver function

1. Remove #ifdef __MPI from timer code, encapsulate in timer_wrapper.h
2. Move ESolver clean logic to after_all_runners method
3. Replace clean_esolver calls with direct delete p_esolver
4. Remove #ifdef __MPI from delete p_esolver
5. Add Cblacs_exit(1) in after_all_runners for LCAO calculations

* move exx_helper to module_pwdft

* rename pw files

* Refactor: Move and rename nonlocal_pw files to module_pwdft directory

* Refactor: Move and rename velocity_pw, veff_pw, and meta_pw files to module_pwdft directory

* Refactor: Move and rename all operator_pw files to module_pwdft directory and clean up

* Refactor: Rename stress_func_xxx files to stress_xxx by removing _func suffix

* Rename V*_in_pw files to more concise names and update references

This commit includes:
1. Renamed files in module_pwdft directory:
   - VL_in_pw.cpp/h → vl_pw.cpp/h
   - VNL_in_pw.cpp/h → vnl_pw.cpp/h
   - VNL_grad_pw.cpp → vnl_pw_grad.cpp
   - VSep_in_pw.cpp/h → vsep_pw.cpp/h

2. Updated CMakeLists.txt and Makefile.Objects to use new filenames

3. Updated include paths in 41 files across the codebase:
   - source_cell/test/klist_test.cpp and klist_test_para.cpp
   - source_esolver/esolver_fp.h, esolver_ks_pw.cpp, esolver_ks_pw.h
   - source_estate/module_pot/pot_sep.h, potential_new.h, setup_estate_pw.h
   - source_estate/test/elecstate_pw_test.cpp
   - source_io/test/for_testing_input_conv.h, for_testing_klist.h
   - source_lcao/LCAO_set.h
   - source_psi/psi_initializer.h and related files
   - source_pw/module_ofdft/of_stress_pw.h
   - source_pw/module_pwdft/* (multiple files)
   - source_pw/module_stodft/sto_stress_pw.h

4. Verified compilation success with make -j30

The renaming follows consistent naming conventions and makes filenames more concise.

* fix Makefile.Objects

* Fix CI/CD error: Update operator_pw paths to new op_pw locations

This commit fixes the CI/CD build error by updating references to the old operator_pw directory structure:

1. Updated source/source_hsolver/test/CMakeLists.txt:
   - Changed all 7 references from '../../source_pw/module_pwdft/operator_pw/operator_pw.cpp' to '../../source_pw/module_pwdft/op_pw.cpp'

2. Updated source/source_hsolver/test/diago_mock.h:
   - Changed '#include "source_pw/module_pwdft/operator_pw/operator_pw.h"' to '#include "source_pw/module_pwdft/op_pw.h"'

The operator_pw directory has been renamed and its files moved to the module_pwdft root directory with op_pw_ prefixes, so these path updates are necessary to ensure CI/CD builds succeed.

* Rename psi_initializer* files to psi_init* and psi_init* to psi_prepare*

This commit includes:

1. Renamed psi_initializer* files to psi_init*:
   - psi_initializer_atomic.cpp/h → psi_init_atomic.cpp/h
   - psi_initializer_atomic_random.cpp/h → psi_init_atomic_random.cpp/h
   - psi_initializer_file.cpp/h → psi_init_file.cpp/h
   - psi_initializer_nao.cpp/h → psi_init_nao.cpp/h
   - psi_initializer_nao_random.cpp/h → psi_init_nao_random.cpp/h
   - psi_initializer_random.cpp/h → psi_init_random.cpp/h

2. Renamed psi_init* files to psi_prepare*:
   - psi_init.cpp → psi_prepare.cpp
   - psi_init.h → psi_prepare.h

3. Updated all references to the renamed files:
   - Updated include directives in all affected files
   - Updated class names and constructor names
   - Updated template instantiations
   - Updated inheritance relationships
   - Updated CMakeLists.txt to use new filenames
   - Updated Makefile.Objects to use new filenames
   - Updated to_wannier90_lcao_in_pw.cpp to use new filenames

4. Fixed compilation errors and ensured CPU version builds successfully

The changes follow consistent naming conventions and improve code organization.

* Move to_wannier90 files to module_wannier directory

This commit includes the following changes:

1. Moved to_wannier90 files from source_io to module_wannier directory:
   - source/source_io/to_wannier90.cpp -> source/source_io/module_wannier/to_wannier90.cpp
   - source/source_io/to_wannier90.h -> source/source_io/module_wannier/to_wannier90.h
   - source/source_io/to_wannier90_lcao.cpp -> source/source_io/module_wannier/to_wannier90_lcao.cpp
   - source/source_io/to_wannier90_lcao.h -> source/source_io/module_wannier/to_wannier90_lcao.h
   - source/source_io/to_wannier90_lcao_in_pw.cpp -> source/source_io/module_wannier/to_wannier90_lcao_in_pw.cpp
   - source/source_io/to_wannier90_lcao_in_pw.h -> source/source_io/module_wannier/to_wannier90_lcao_in_pw.h
   - source/source_io/to_wannier90_pw.cpp -> source/source_io/module_wannier/to_wannier90_pw.cpp
   - source/source_io/to_wannier90_pw.h -> source/source_io/module_wannier/to_wannier90_pw.h

2. Updated include directives in affected files:
   - source/source_io/ctrl_scf_lcao.cpp: Updated to_wannier90_lcao.h include path
   - source/source_esolver/esolver_ks_lcaopw.cpp: Updated to_wannier90_lcao_in_pw.h include path
   - source/source_io/ctrl_output_pw.cpp: Updated to_wannier90_pw.h include path
   - Updated include paths in all moved files to use relative paths

3. Updated build system files:
   - source/source_io/CMakeLists.txt: Added module_wannier/to_wannier90* files
   - source/Makefile.Objects: Updated paths for all moved files

4. Fixed relative path issues in module_wannier files:
   - Updated binstream.h include to use ../binstream.h
   - Updated other relative include paths as needed

All changes have been verified by compiling the CPU version successfully.

* Move read_input files to module_parameter directory

This commit includes the following changes:

1. Moved read_input files from source_io to module_parameter directory:
   - source/source_io/read_input.cpp -> source/source_io/module_parameter/read_input.cpp
   - source/source_io/read_input.h -> source/source_io/module_parameter/read_input.h
   - source/source_io/read_input_item_deepks.cpp -> source/source_io/module_parameter/read_input_item_deepks.cpp
   - source/source_io/read_input_item_elec_stru.cpp -> source/source_io/module_parameter/read_input_item_elec_stru.cpp
   - source/source_io/read_input_item_exx_dftu.cpp -> source/source_io/module_parameter/read_input_item_exx_dftu.cpp
   - source/source_io/read_input_item_md.cpp -> source/source_io/module_parameter/read_input_item_md.cpp
   - source/source_io/read_input_item_model.cpp -> source/source_io/module_parameter/read_input_item_model.cpp
   - source/source_io/read_input_item_ofdft.cpp -> source/source_io/module_parameter/read_input_item_ofdft.cpp
   - source/source_io/read_input_item_other.cpp -> source/source_io/module_parameter/read_input_item_other.cpp
   - source/source_io/read_input_item_output.cpp -> source/source_io/module_parameter/read_input_item_output.cpp
   - source/source_io/read_input_item_postprocess.cpp -> source/source_io/module_parameter/read_input_item_postprocess.cpp
   - source/source_io/read_input_item_relax.cpp -> source/source_io/module_parameter/read_input_item_relax.cpp
   - source/source_io/read_input_item_sdft.cpp -> source/source_io/module_parameter/read_input_item_sdft.cpp
   - source/source_io/read_input_item_system.cpp -> source/source_io/module_parameter/read_input_item_system.cpp
   - source/source_io/read_input_item_tddft.cpp -> source/source_io/module_parameter/read_input_item_tddft.cpp
   - source/source_io/read_input_tool.h -> source/source_io/module_parameter/read_input_tool.h

2. Updated include directives in affected files:
   - source/source_io/module_parameter/read_input.h: Updated input_item.h include path to use ../input_item.h
   - source/source_main/driver.cpp: Updated read_input.h include path to use source_io/module_parameter/read_input.h
   - source/source_io/parse_args.cpp: Updated read_input.h include path to use module_parameter/read_input.h
   - source/source_io/read_set_globalv.cpp: Updated read_input.h and read_input_tool.h include paths

3. Updated build system files:
   - source/source_io/CMakeLists.txt: Updated read_input files paths to use module_parameter/ prefix
   - source/Makefile.Objects: Updated read_input files paths to use module_parameter/ prefix

4. Fixed relative path issues in module_parameter files:
   - Updated input_item.h include to use ../input_item.h
   - Updated other relative include paths as needed

All changes have been verified by compiling the CPU version successfully.

* Move berryphase and unk files to module_unk directory

This commit includes the following changes:

1. Moved berryphase and unk files from source_io to module_unk directory:
   - source/source_io/berryphase.cpp -> source/source_io/module_unk/berryphase.cpp
   - source/source_io/berryphase.h -> source/source_io/module_unk/berryphase.h
   - source/source_io/unk_overlap_lcao.cpp -> source/source_io/module_unk/unk_overlap_lcao.cpp
   - source/source_io/unk_overlap_lcao.h -> source/source_io/module_unk/unk_overlap_lcao.h
   - source/source_io/unk_overlap_pw.cpp -> source/source_io/module_unk/unk_overlap_pw.cpp
   - source/source_io/unk_overlap_pw.h -> source/source_io/module_unk/unk_overlap_pw.h

2. Updated include directives in affected files:
   - source/source_cell/klist.cpp: Updated berryphase.h include path to use source_io/module_unk/berryphase.h
   - source/source_esolver/esolver_ks_lcaopw.cpp: Updated berryphase.h include path to use source_io/module_unk/berryphase.h
   - source/source_esolver/lcao_others.cpp: Updated berryphase.h include path to use source_io/module_unk/berryphase.h
   - source/source_io/ctrl_output_pw.cpp: Updated berryphase.h include path to use module_unk/berryphase.h
   - source/source_io/ctrl_scf_lcao.cpp: Updated berryphase.h include path to use module_unk/berryphase.h
   - source/source_io/input_conv.cpp: Updated berryphase.h include path to use module_unk/berryphase.h
   - source/source_io/module_unk/berryphase.cpp: Updated complexmatrix.h include path to use ../../source_base/complexmatrix.h

3. Updated build system files:
   - source/source_io/CMakeLists.txt: Updated berryphase.cpp and unk_overlap_*.cpp paths to use module_unk/ prefix
   - source/Makefile.Objects: Updated berryphase.o and unk_overlap_*.o paths to use module_unk/ prefix

All changes have been verified by compiling the CPU version successfully.

* Move input_conv and input_item files to module_parameter directory

This commit includes the following changes:

1. Moved input_conv and input_item files from source_io to module_parameter directory:
   - source/source_io/input_conv.cpp -> source/source_io/module_parameter/input_conv.cpp
   - source/source_io/input_conv.h -> source/source_io/module_parameter/input_conv.h
   - source/source_io/input_item.h -> source/source_io/module_parameter/input_item.h

2. Updated include directives in affected files:
   - source/source_main/driver.cpp: Updated input_conv.h include path to use source_io/module_parameter/input_conv.h
   - source/source_esolver/esolver_ks_lcaopw.cpp: Updated input_conv.h include path to use source_io/module_parameter/input_conv.h
   - source/source_estate/module_pot/H_TDDFT_pw.h: Updated input_conv.h include path to use source_io/module_parameter/input_conv.h
   - source/source_estate/module_pot/H_TDDFT_pw.cpp: Updated input_conv.h include path to use source_io/module_parameter/input_conv.h
   - source/source_lcao/FORCE_STRESS.h: Updated input_conv.h include path to use source_io/module_parameter/input_conv.h
   - source/source_io/module_parameter/input_conv.cpp: Updated input_conv.h include path to use input_conv.h and berryphase.h include path to use ../module_unk/berryphase.h
   - source/source_io/module_parameter/read_input.h: Updated input_item.h include path to use input_item.h

3. Updated build system files:
   - source/source_io/CMakeLists.txt: Updated input_conv.cpp path to use module_parameter/input_conv.cpp
   - source/Makefile.Objects: Updated input_conv.o path to use module_parameter/input_conv.o

All changes have been verified by compiling the CPU version successfully.

* Move DOS-related files to module_dos directory

This commit includes the following changes:

1. Moved DOS-related files from source_io to module_dos directory:
   - source/source_io/cal_dos.cpp -> source/source_io/module_dos/cal_dos.cpp
   - source/source_io/cal_dos.h -> source/source_io/module_dos/cal_dos.h
   - source/source_io/cal_ldos.cpp -> source/source_io/module_dos/cal_ldos.cpp
   - source/source_io/cal_ldos.h -> source/source_io/module_dos/cal_ldos.h
   - source/source_io/cal_pdos_gamma.cpp -> source/source_io/module_dos/cal_pdos_gamma.cpp
   - source/source_io/cal_pdos_gamma.h -> source/source_io/module_dos/cal_pdos_gamma.h
   - source/source_io/cal_pdos_multik.cpp -> source/source_io/module_dos/cal_pdos_multik.cpp
   - source/source_io/cal_pdos_multik.h -> source/source_io/module_dos/cal_pdos_multik.h
   - source/source_io/write_dos_lcao.cpp -> source/source_io/module_dos/write_dos_lcao.cpp
   - source/source_io/write_dos_lcao.h -> source/source_io/module_dos/write_dos_lcao.h
   - source/source_io/write_dos_pw.cpp -> source/source_io/module_dos/write_dos_pw.cpp
   - source/source_io/write_dos_pw.h -> source/source_io/module_dos/write_dos_pw.h

2. Updated include directives in affected files:
   - source/source_io/ctrl_scf_lcao.cpp: Updated write_dos_lcao.h include path to use module_dos/write_dos_lcao.h
   - source/source_io/ctrl_runner_lcao.cpp: Updated cal_ldos.h include path to use module_dos/cal_ldos.h
   - source/source_io/ctrl_output_pw.cpp: Updated write_dos_pw.h and cal_ldos.h include paths to use module_dos/ prefix
   - source/source_io/module_dos/cal_ldos.cpp: Updated cube_io.h include path to use ../cube_io.h
   - source/source_io/module_dos/cal_pdos_gamma.cpp: Updated write_orb_info.h include path to use ../write_orb_info.h
   - source/source_io/module_dos/cal_pdos_multik.cpp: Updated write_orb_info.h include path to use ../write_orb_info.h
   - source/source_io/module_dos/write_dos_lcao.cpp: Updated nscf_fermi_surf.h include path to use ../nscf_fermi_surf.h
   - source/source_io/module_dos/write_dos_pw.cpp: Updated nscf_fermi_surf.h include path to use ../nscf_fermi_surf.h

3. Updated build system files:
   - source/source_io/CMakeLists.txt: Updated all DOS-related files paths to use module_dos/ prefix
   - source/Makefile.Objects: Updated all DOS-related files paths to use module_dos/ prefix

All changes have been verified by compiling the CPU version successfully.

* Move to_qo files to module_qo directory

This commit includes the following changes:

1. Moved to_qo files from source_io to module_qo directory:
   - source/source_io/to_qo.h -> source/source_io/module_qo/to_qo.h
   - source/source_io/to_qo_kernel.cpp -> source/source_io/module_qo/to_qo_kernel.cpp
   - source/source_io/to_qo_mpi.cpp -> source/source_io/module_qo/to_qo_mpi.cpp
   - source/source_io/to_qo_structures.cpp -> source/source_io/module_qo/to_qo_structures.cpp

2. Updated include directives in affected files:
   - source/source_io/ctrl_scf_lcao.cpp: Updated to_qo.h include path to use module_qo/to_qo.h
   - source/source_io/test/to_qo_test.cpp: Updated to_qo.h include path to use module_qo/to_qo.h
   - source/source_io/module_qo/to_qo_kernel.cpp: Updated to_qo.h include path to use to_qo.h (relative path)
   - source/source_io/module_qo/to_qo_mpi.cpp: Updated to_qo.h and parallel_common.h include paths to use to_qo.h and ../../source_base/parallel_common.h (relative paths)
   - source/source_io/module_qo/to_qo_structures.cpp: Updated to_qo.h and parallel_common.h include paths to use to_qo.h and ../../source_base/parallel_common.h (relative paths)

3. Updated build system files:
   - source/source_io/CMakeLists.txt: Updated to_qo files paths to use module_qo/ prefix
   - source/Makefile.Objects: Updated to_qo files paths to use module_qo/ prefix

All changes have been verified by compiling the CPU version successfully.

* Move mlkedf and npz files to module_ml directory

This commit includes the following changes:

1. Moved mlkedf and npz files from source_io to module_ml directory:
   - source/source_io/cal_mlkedf_descriptors.cpp -> source/source_io/module_ml/cal_mlkedf_descriptors.cpp
   - source/source_io/cal_mlkedf_descriptors.h -> source/source_io/module_ml/cal_mlkedf_descriptors.h
   - source/source_io/write_mlkedf_descriptors.cpp -> source/source_io/module_ml/write_mlkedf_descriptors.cpp
   - source/source_io/write_mlkedf_descriptors.h -> source/source_io/module_ml/write_mlkedf_descriptors.h
   - source/source_io/io_npz.cpp -> source/source_io/module_ml/io_npz.cpp
   - source/source_io/io_npz.h -> source/source_io/module_ml/io_npz.h

2. Updated include directives in affected files:
   - source/source_estate/module_pot/pot_ml_exx.h: Updated cal_mlkedf_descriptors.h include path to use source_io/module_ml/cal_mlkedf_descriptors.h
   - source/source_pw/module_ofdft/ml_base.h: Updated cal_mlkedf_descriptors.h include path to use source_io/module_ml/cal_mlkedf_descriptors.h
   - source/source_io/ctrl_output_pw.cpp: Updated write_mlkedf_descriptors.h include path to use module_ml/write_mlkedf_descriptors.h
   - source/source_esolver/esolver_dm2rho.cpp: Updated io_npz.h include path to use ../source_io/module_ml/io_npz.h
   - source/source_io/module_ml/write_mlkedf_descriptors.h: Updated cal_mlkedf_descriptors.h include path to use cal_mlkedf_descriptors.h (relative path)

3. Updated build system files:
   - source/source_io/CMakeLists.txt: Updated mlkedf and npz files paths to use module_ml/ prefix
   - source/Makefile.Objects: Updated io_npz.o path to use module_ml/io_npz.o

All changes have been verified by compiling the CPU version successfully.

* Move ctrl files to module_ctrl directory

This commit includes the following changes:

1. Moved ctrl files from source_io to module_ctrl directory:
   - source/source_io/ctrl_output_pw.cpp -> source/source_io/module_ctrl/ctrl_output_pw.cpp
   - source/source_io/ctrl_output_pw.h -> source/source_io/module_ctrl/ctrl_output_pw.h
   - source/source_io/ctrl_output_fp.cpp -> source/source_io/module_ctrl/ctrl_output_fp.cpp
   - source/source_io/ctrl_output_fp.h -> source/source_io/module_ctrl/ctrl_output_fp.h
   - source/source_io/ctrl_output_td.cpp -> source/source_io/module_ctrl/ctrl_output_td.cpp
   - source/source_io/ctrl_output_td.h -> source/source_io/module_ctrl/ctrl_output_td.h
   - source/source_io/ctrl_scf_lcao.cpp -> source/source_io/module_ctrl/ctrl_scf_lcao.cpp
   - source/source_io/ctrl_scf_lcao.h -> source/source_io/module_ctrl/ctrl_scf_lcao.h
   - source/source_io/ctrl_runner_lcao.cpp -> source/source_io/module_ctrl/ctrl_runner_lcao.cpp
   - source/source_io/ctrl_runner_lcao.h -> source/source_io/module_ctrl/ctrl_runner_lcao.h
   - source/source_io/ctrl_iter_lcao.cpp -> source/source_io/module_ctrl/ctrl_iter_lcao.cpp
   - source/source_io/ctrl_iter_lcao.h -> source/source_io/module_ctrl/ctrl_iter_lcao.h

2. Updated include directives in affected files:
   - source/source_esolver/esolver_fp.cpp: Updated ctrl_output_fp.h include path to use source_io/module_ctrl/ctrl_output_fp.h
   - source/source_esolver/esolver_ks_lcao.cpp: Updated ctrl_runner_lcao.h, ctrl_iter_lcao.h, ctrl_scf_lcao.h include paths to use source_io/module_ctrl/
   - source/source_esolver/esolver_ks_pw.cpp: Updated ctrl_output_pw.h include path to use source_io/module_ctrl/ctrl_output_pw.h
   - source/source_esolver/esolver_ks_lcao_tddft.cpp: Updated ctrl_output_td.h include path to use source_io/module_ctrl/ctrl_output_td.h
   - source/source_io/module_ctrl/ctrl_output_pw.cpp: Updated include paths to use relative paths
   - source/source_io/module_ctrl/ctrl_output_fp.cpp: Updated include paths to use relative paths
   - source/source_io/module_ctrl/ctrl_scf_lcao.cpp: Updated include paths to use relative paths
   - source/source_io/module_ctrl/ctrl_runner_lcao.cpp: Updated include paths to use relative paths
   - source/source_io/module_ctrl/ctrl_iter_lcao.cpp: Updated include paths to use relative paths

3. Updated build system files:
   - source/source_io/CMakeLists.txt: Updated ctrl files paths to use module_ctrl/ prefix
   - source/Makefile.Objects: Updated ctrl files paths to use module_ctrl/ prefix

4. Added missing dos-related files to CMakeLists.txt to resolve link errors:
   - module_dos/cal_dos.cpp
   - module_dos/cal_ldos.cpp
   - module_dos/cal_pdos_gamma.cpp
   - module_dos/cal_pdos_multik.cpp
   - module_dos/write_dos_lcao.cpp

All changes have been verified by compiling the CPU version successfully.

* Move bessel and numerical_ files to module_bessel directory

This commit includes the following changes:

1. Moved bessel and numerical_ files from source_io to module_bessel directory:
   - source/source_io/bessel_basis.cpp -> source/source_io/module_bessel/bessel_basis.cpp
   - source/source_io/bessel_basis.h -> source/source_io/module_bessel/bessel_basis.h
   - source/source_io/numerical_basis.cpp -> source/source_io/module_bessel/numerical_basis.cpp
   - source/source_io/numerical_basis.h -> source/source_io/module_bessel/numerical_basis.h
   - source/source_io/numerical_basis_jyjy.cpp -> source/source_io/module_bessel/numerical_basis_jyjy.cpp
   - source/source_io/numerical_basis_jyjy.h -> source/source_io/module_bessel/numerical_basis_jyjy.h
   - source/source_io/numerical_descriptor.cpp -> source/source_io/module_bessel/numerical_descriptor.cpp
   - source/source_io/numerical_descriptor.h -> source/source_io/module_bessel/numerical_descriptor.h

2. Updated include directives in affected files:
   - source/source_esolver/esolver_ks_lcaopw.cpp: Updated numerical_basis.h and numerical_descriptor.h include paths to use source_io/module_bessel/
   - source/source_esolver/pw_others.cpp: Updated numerical_basis.h and numerical_descriptor.h include paths to use source_io/module_bessel/
   - source/source_io/module_ctrl/ctrl_output_pw.cpp: Updated numerical_basis.h and numerical_descriptor.h include paths to use ../module_bessel/
   - source/source_io/test/bessel_basis_test.cpp: Updated bessel_basis.h include path to use ../module_bessel/bessel_basis.h
   - source/source_io/test/numerical_basis_test.cpp: Updated numerical_basis_jyjy.h include path to use source_io/module_bessel/numerical_basis_jyjy.h
   - source/source_io/module_bessel/bessel_basis.h: Updated include paths to use ../../source_base/ and ../../source_cell/
   - source/source_io/module_bessel/numerical_basis.cpp: Updated numerical_basis_jyjy.h include path to use numerical_basis_jyjy.h (relative path)
   - source/source_io/module_bessel/numerical_basis.h: Updated include paths to use ../../source_base/ and ../../source_cell/
   - source/source_io/module_bessel/numerical_basis_jyjy.cpp: Updated numerical_basis_jyjy.h include path to use numerical_basis_jyjy.h (relative path)
   - source/source_io/module_bessel/numerical_basis_jyjy.h: Updated include paths to use ../../source_base/
   - source/source_io/module_bessel/numerical_descriptor.h: Updated include paths to use ../../source_base/ and ../../source_psi/

3. Updated build system files:
   - source/source_io/CMakeLists.txt: Updated bessel and numerical_ files paths to use module_bessel/ prefix
   - source/Makefile.Objects: Updated bessel and numerical_ files paths to use module_bessel/ prefix

All changes have been verified by compiling the CPU version successfully.

* Organize HS and SK files into module_hs directory

* Organize DM files into module_dm directory

This commit moves all density matrix (DM) related files to the dedicated module_dm directory for better code organization:

Moved files:
- source/source_io/output_dmk.cpp -> source/source_io/module_dm/output_dmk.cpp
- source/source_io/write_dmk.cpp -> source/source_io/module_dm/write_dmk.cpp
- source/source_io/write_dmk.h -> source/source_io/module_dm/write_dmk.h
- source/source_io/write_dmr.cpp -> source/source_io/module_dm/write_dmr.cpp
- source/source_io/write_dmr.h -> source/source_io/module_dm/write_dmr.h
- source/source_io/test/write_dmk_test.cpp -> source/source_io/module_dm/test/write_dmk_test.cpp

Updated build system files:
- source/source_io/CMakeLists.txt: Updated paths for output_dmk.cpp, write_dmk.cpp, write_dmr.cpp
- source/Makefile.Objects: Updated paths for output_dmk.o, write_dmk.o, write_dmr.o
- source/source_io/test/CMakeLists.txt: Updated path for write_dmk_test.cpp

Updated include paths in:
- source/source_io/module_ctrl/ctrl_scf_lcao.cpp
- source/source_io/module_dm/write_dmk.cpp

The changes ensure all DM related functionality is consolidated in one directory, improving code maintainability and organization.

* Move output_dmk.h to module_dm directory

This commit moves output_dmk.h to the module_dm directory for better code organization:

Moved file:
- source/source_io/output_dmk.h -> source/source_io/module_dm/output_dmk.h

Updated include paths in:
- source/source_io/module_dm/output_dmk.cpp
- source/source_io/output_mulliken.h

The changes ensure all DM related files are consolidated in the module_dm directory.

* Consolidate Mulliken-related files into module_mulliken directory

This commit moves all Mulliken population analysis related files to the dedicated module_mulliken directory for better code organization:

Moved files:
- source/source_io/output_mulliken.cpp -> source/source_io/module_mulliken/output_mulliken.cpp
- source/source_io/output_mulliken.h -> source/source_io/module_mulliken/output_mulliken.h
- source/source_io/module_hs/output_sk.cpp -> source/source_io/module_mulliken/output_sk.cpp
- source/source_io/module_hs/output_sk.h -> source/source_io/module_mulliken/output_sk.h
- source/source_io/module_dm/output_dmk.cpp -> source/source_io/module_mulliken/output_dmk.cpp
- source/source_io/module_dm/output_dmk.h -> source/source_io/module_mulliken/output_dmk.h

Updated build system files:
- source/source_io/CMakeLists.txt: Updated paths for output_mulliken.cpp, output_sk.cpp, output_dmk.cpp
- source/Makefile.Objects: Updated paths for output_mulliken.o, output_sk.o, output_dmk.o

Updated include paths in:
- source/source_io/module_ctrl/ctrl_scf_lcao.cpp
- source/source_io/module_mulliken/output_dmk.cpp
- source/source_io/module_mulliken/output_mulliken.cpp
- source/source_io/module_mulliken/output_mulliken.h

The changes ensure all Mulliken population analysis related functionality is consolidated in one directory, improving code maintainability and organization.

* Move ELF-related files to module_elf directory

This commit moves ELF (Electron Localization Function) related files to the dedicated module_elf directory for better code organization:

Moved files:
- source/source_io/write_elf.cpp -> source/source_io/module_elf/write_elf.cpp
- source/source_io/write_elf.h -> source/source_io/module_elf/write_elf.h

Updated build system files:
- source/source_io/CMakeLists.txt: Updated path for write_elf.cpp

Updated include paths in:
- source/source_io/module_ctrl/ctrl_output_fp.cpp

The changes ensure all ELF-related functionality is consolidated in one directory, improving code maintainability and organization.

* Move TD current-related files to module_current directory

This commit moves time-dependent current (TD current) related files to the dedicated module_current directory for better code organization:

Moved files:
- source/source_io/td_current_io.cpp -> source/source_io/module_current/td_current_io.cpp
- source/source_io/td_current_io.h -> source/source_io/module_current/td_current_io.h
- source/source_io/td_current_io_comm.cpp -> source/source_io/module_current/td_current_io_comm.cpp

Updated build system files:
- source/source_io/CMakeLists.txt: Updated paths for td_current_io.cpp, td_current_io_comm.cpp

Updated include paths in:
- source/source_io/module_ctrl/ctrl_output_td.cpp
- source/source_esolver/esolver_ks_lcao_tddft.cpp

The changes ensure all TD current-related functionality is consolidated in one directory, improving code maintainability and organization.

* Consolidate output-related files into module_output directory

This commit moves output-related files to the dedicated module_output directory for better code organization:

Moved files:
- source/source_io/filename.cpp/h -> source/source_io/module_output/filename.cpp/h
- source/source_io/output.cpp/h -> source/source_io/module_output/output.cpp/h
- source/source_io/output_log.cpp/h -> source/source_io/module_output/output_log.cpp/h
- source/source_io/print_info.cpp/h -> source/source_io/module_output/print_info.cpp/h
- source/source_io/write_pao.cpp/h -> source/source_io/module_output/write_pao.cpp/h

Updated build system files:
- source/source_io/CMakeLists.txt: Updated paths for all moved files

Updated include paths in:
- All files that include output.h, output_log.h, print_info.h, write_pao.h, and filename.h
- Updated relative include paths in output.h for files in module_output

The changes ensure all output-related functionality is consolidated in one directory, improving code maintainability and organization.

* Fix include paths for filename.h

Fixed remaining include path issues after moving files to module_output directory:
- source/source_io/write_wfc_nao.cpp: Updated include path from "filename.h" to "source_io/module_output/filename.h"
- source/source_io/module_output/filename.cpp: Updated include path from "filename.h" to "source_io/module_output/filename.h"

* Fix hybrid functional compilation errors

This commit fixes compilation errors when building ABACUS with hybrid functional support (ENABLE_LIBRI=ON):

1. Fixed include path issues:
   - source/source_io/restart_exx_csr.hpp: Updated include path from "source_io/write_HS_sparse.h" to "source_io/module_hs/write_HS_sparse.h"
   - source/source_lcao/module_ri/Exx_LRI_interface.hpp: Updated the same include path

2. Fixed header file name change:
   - source/source_lcao/module_ri/exx_lip.hpp: Updated include path from "source_psi/psi_init.h" to "source_psi/psi_initializer.h" (header file was renamed)

These changes ensure that ABACUS can be successfully compiled with hybrid functional support enabled, allowing users to perform calculations with hybrid functionals like HSE06, PBE0, etc.

The fix was necessary because:
- The write_HS_sparse.h file was moved to the module_hs directory in a previous refactoring
- The psi_init.h header file was renamed to psi_initializer.h

With these fixes, the hybrid functional version of ABACUS compiles successfully.

* Fix CICD errors: Update output-related paths in CMakeLists.txt

This commit fixes CICD build errors by updating paths to output-related files that were moved to the module_output directory:

Updated paths in test directory CMakeLists.txt files:
- source_io/output.cpp -> source_io/module_output/output.cpp
- source_io/print_info.cpp -> source_io/module_output/print_info.cpp
- source_io/output_log.cpp -> source_io/module_output/output_log.cpp

Modified files:
- source/source_cell/module_neighbor/test/CMakeLists.txt
- source/source_cell/test/CMakeLists.txt
- source/source_cell/test_pw/CMakeLists.txt
- source/source_esolver/test/CMakeLists.txt
- source/source_estate/module_dm/test/CMakeLists.txt
- source/source_estate/test/CMakeLists.txt
- source/source_lcao/module_deepks/test/CMakeLists.txt
- source/source_lcao/module_hcontainer/test/CMakeLists.txt
- source/source_lcao/module_ri/module_exx_symmetry/test/CMakeLists.txt
- source/source_md/test/CMakeLists.txt
- source/source_pw/module_pwdft/test/CMakeLists.txt
- source/source_relax/test/CMakeLists.txt

These changes ensure that the CICD build system can correctly find the output-related files after they were reorganized into the module_output directory.

* fix bugs

* fix tests

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* Fix unit test compilation errors by updating include paths

This commit fixes multiple compilation errors in the unit tests by updating include paths to reflect the new directory structure:

1. source/source_io/test/write_wfc_nao_test.cpp:
   - Updated ../filename.h to ../module_output/filename.h

2. source/source_io/test/cal_dos_test.cpp:
   - Updated source_io/cal_dos.h to source_io/module_dos/cal_dos.h

3. source/source_io/test/write_dos_pw_test.cpp:
   - Updated source_io/write_dos_pw.h to source_io/module_dos/write_dos_pw.h

4. source/source_io/test/print_info_test.cpp:
   - Updated source_io/berryphase.h to source_io/module_unk/berryphase.h

5. source/source_io/test/to_qo_test.cpp:
   - Updated module_qo/to_qo.h to source_io/module_qo/to_qo.h

6. source/source_io/test/output_mulliken_test.cpp:
   - Updated ../output_mulliken.h to ../module_mulliken/output_mulliken.h
   - Updated source_io/module_dm/output_dmk.h to source_io/module_mulliken/output_dmk.h
   - Updated source_io/module_sk/output_sk.h to source_io/module_mulliken/output_sk.h

7. source/source_io/test/output_mulliken_mock.cpp:
   - Updated source_io/output_dmk.h to source_io/module_dm/output_dmk.h
   - Updated source_io/module_dm/output_dmk.h to source_io/module_mulliken/output_dmk.h
   - Updated source_io/module_sk/output_sk.h to source_io/module_mulliken/output_sk.h

8. source/source_io/test/output_test.cpp:
   - Updated ../output.h to ../module_output/output.h

9. source/source_io/test/for_testing_klist.h:
   - Updated source_io/berryphase.h to source_io/module_unk/berryphase.h

10. source/source_io/module_dm/test/write_dmk_test.cpp:
    - Updated prepare_unitcell.h to ../../test/prepare_unitcell.h

11. source/source_io/test_serial/read_input_item_test.cpp:
    - Updated source_io/input_item.h to source_io/module_parameter/input_item.h

12. source/source_io/test_serial/io_system_variable_test.cpp:
    - Updated source_io/input_item.h to source_io/module_parameter/input_item.h

These changes ensure that all unit tests compile successfully with the new directory structure, enabling the complete test suite to be built and run.

* Move files to module directories and update paths

* Move wave function related files to module_wf directory and update include paths

This commit:
1. Moves wave function related files to module_wf directory:
   - get_wf_lcao.cpp/h
   - get_wf_pw.h
   - read_wf2rho_pw.cpp/h
   - read_wfc_nao.cpp/h
   - read_wfc_pw.cpp/h
   - write_wfc_nao.cpp/h
   - write_wfc_pw.cpp/h

2. Updates include paths in affected files:
   - source_esolver/esolver_ks_lcao_tddft.cpp
   - source_esolver/lcao_others.cpp
   - source_estate/module_charge/charge_init.cpp
   - source_io/CMakeLists.txt
   - source_io/module_ctrl/ctrl_output_pw.cpp
   - source_io/module_ctrl/ctrl_scf_lcao.cpp
   - source_io/module_wf/get_wf_lcao.cpp
   - source_io/module_wf/read_wfc_nao.cpp
   - source_io/module_wf/read_wfc_pw.cpp
   - source_io/module_wf/write_wfc_nao.cpp
   - source_io/module_wf/write_wfc_pw.cpp
   - source_io/test/CMakeLists.txt
   - source_io/test/read_wf2rho_pw_test.cpp
   - source_io/test/read_wfc_nao_test.cpp
   - source_io/test/read_wfc_pw_test.cpp
   - source_io/test/write_wfc_nao_test.cpp
   - source_lcao/LCAO_set.cpp
   - source_lcao/module_lr/esolver_lrtd_lcao.cpp
   - source_psi/psi_init_file.cpp
   - source_psi/test/CMakeLists.txt

3. Ensures all unit tests compile successfully with the new directory structure

The codebase now has a more organized structure with wave function related functionality grouped under module_wf.

* Move restart related files to module_restart directory and update include paths

This commit:
1. Moves restart related files to module_restart directory:
   - restart.cpp
   - restart.h
   - restart_exx_csr.h
   - restart_exx_csr.hpp

2. Updates include paths in affected files:
   - source_estate/module_charge/charge_init.cpp
   - source_io/CMakeLists.txt
   - source_io/module_ctrl/ctrl_iter_lcao.h
   - source_io/module_parameter/input_conv.cpp
   - source_io/test/for_testing_input_conv.h
   - source_lcao/module_operator_lcao/op_exx_lcao.hpp
   - source_lcao/module_ri/Exx_LRI_interface.hpp

3. Ensures all unit tests compile successfully with the new directory structure

The codebase now has a more organized structure with restart related functionality grouped under module_restart.

* Move read_set_globalv.cpp to module_parameter directory and update include paths

This commit:
1. Moves read_set_globalv.cpp from source_io directory to module_parameter directory

2. Updates include paths and file references in affected files:
   - source_io/CMakeLists.txt: Updated file path for read_set_globalv.cpp
   - source_io/test_serial/CMakeLists.txt: Updated file path for read_set_globalv.cpp
   - source/Makefile.Objects: Updated file path for read_set_globalv.o
   - source_io/module_parameter/read_set_globalv.cpp: Updated internal include paths to use relative paths within module_parameter

3. Ensures all unit tests compile successfully with the new directory structure

The codebase now has a more organized structure with parameter-related functionality grouped under module_parameter.

* fix exx

* fix

* fix psi_init_file.cpp

* fix Makefile.Objects

* remove two tests in 11_PW_GPU, the two tests have some issues that need to be fixed later

* fix psi_random

* fix CASES_GPU.txt

---------

Co-authored-by: abacus_fixer <mohanchen@pku.eud.cn>
…ation (Useful information for GPU coding) (#6936)

* Refactor: introduce DeviceContext singleton for unified GPU initialization

- Add DeviceContext singleton class (device_context.h/cpp) to manage GPU
  device binding with thread-safe initialization using std::mutex
- Move GPU initialization from get_device_kpar() side-effect to explicit
  DeviceContext::init() call in read_input.cpp after INPUT parsing
- Use MPI_COMM_TYPE_SHARED for modern node-local rank detection
- Update callers to use DeviceContext::instance().get_device_id():
  - hsolver_lcao.cpp: parakSolve_cusolver()
  - diag_cusolvermp.cu: constructor
  - gint_gpu_vars.cpp: constructor
  - td_nonlocal_lcao.cpp: remove redundant set_device_by_rank() call

This is Phase 1 of GPU resource initialization refactoring, establishing
a single entry point for GPU device binding instead of scattered calls.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Refactor: cleanup device.cpp and merge DeviceContext

Phase 2 of GPU device module refactoring:
- Remove deprecated functions: stringCmp, get_node_rank(), set_device_by_rank()
- Merge device_context.h/cpp into device.h/cpp
- Update include statements in dependent files
- Remove device_context.cpp from CMakeLists.txt

This reduces ~70 lines of dead code and consolidates the device
module into fewer files with a unified interface.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Refactor: modularize device module with single responsibility per file

- Create kernel_compat.h: move atomicAdd polyfill for pre-Pascal GPUs
- Create device_helpers.h/cpp: extract get_device_type and get_current_precision templates
- Create gpu_runtime.h: unified CUDA/ROCm API macros for portable GPU code
- Refactor output_device.cpp: unify duplicated CUDA/ROCm implementations (~150 lines reduced)
- Update device.h: clean interface with only DeviceContext and information namespace
- Update CMakeLists.txt: add device_helpers.cpp to build

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Refactor: simplify parakSolve_cusolver using DeviceContext

- Utilize DeviceContext for node-local rank and device count
- Remove redundant MPI_Comm_split_type and manual CUDA calls
- Cleanup unused variables and communicator management

* Refactor: remove redundant cudaGetDeviceCount in snap_psibeta_gpu

- Remove manual device count check in initialize_gpu_resources
- Rely on DeviceContext to handle device availability and binding
- Simplify GPU initialization logic in module_rt

* Refactor: rename initialize_gpu_resources to init_snap_psibeta_gpu

- Rename function to reflect its module-specific scope
- Update comments to clarify that general GPU setup is handled by DeviceContext
- Remove unused finalize_gpu_resources declaration
- Update caller in td_nonlocal_lcao.cpp

* Refactor: separate kernel_compat.h from device.h

Remove unconditional include of kernel_compat.h from device.h to
properly separate Host/Device code. The kernel_compat.h header
contains CUDA-specific code (__device__ keyword) and should only
be included by .cu files that actually use atomicAdd.

Add explicit includes to the 4 CUDA files that need it:
- stress_op.cu
- force_op.cu
- exx_cal_energy_op.cu
- phi_operator_kernel.cu

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Refactor: move get_device_kpar logic to read_input_item_system

Move GPU kpar validation from device module to kpar's reset_value
in read_input_item_system.cpp. This keeps parameter validation logic
with its related input item rather than in the device module.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Refactor: consolidate CUDA error checking macros into device_check.h

- Update device_check.h with proper error handling (exit on error, stderr output)
- Add cuSOLVER error string function with full IRS status codes
- Add CHECK_LAST_CUDA_ERROR, CHECK_CUDA_SYNC, CHECK_CAL macros
- Add ROCm CHECK_CUSOLVER support with hipsolver
- Remove error checking code from module_container/base/macros/cuda.h
- Remove error checking macros from helper_cuda.h
- Delete helper_cusolver.h (functionality merged into device_check.h)
- Update diag_cusolver.cu and diag_cusolvermp.cu to use new macros

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Refactor: replace old CUDA error macros with CHECK_* macros

- Replace cudaErrcheck -> CHECK_CUDA
- Replace cublasErrcheck -> CHECK_CUBLAS
- Replace cusolverErrcheck -> CHECK_CUSOLVER
- Replace checkCudaErrors -> CHECK_CUDA
- Replace CUSOLVER_CHECK -> CHECK_CUSOLVER
- Replace CAL_CHECK -> CHECK_CAL
- Replace cudaCheckOnDebug -> CHECK_CUDA_SYNC
- Replace getLastCudaError -> CHECK_LAST_CUDA_ERROR
- Update gpuErrcheck alias in gpu_runtime.h
- Remove deprecated compatibility aliases from device_check.h

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Refactor: remove CAL_CHECK compatibility alias from device_check.h

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Refactor: unify cufftGetErrorString into device_check.h

- Add _cufftGetErrorString static function to device_check.h
- Remove dependency on cuda_compat.h for cufft error strings
- Update CHECK_CUFFT macro to use the local function

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Refactor: remove cufftGetErrorStringCompat from cuda_compat

The function is now unified into device_check.h as _cufftGetErrorString.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Refactor: remove helper_cuda.h and helper_string.h

  - Replaced helper_cuda.h with device_check.h in hegvd_op.cu and diag_cusolvermp.cu

  - Removed helper_cuda.h and helper_string.h as they are no longer used

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Refactor: unify DeviceContext::init() interface for MPI and non-MPI builds

Remove conditional compilation from DeviceContext::init() signature.
Now both MPI and non-MPI builds use the same void init() interface,
with MPI_COMM_WORLD used internally in MPI builds.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Build: Fix CI failures for PyTest and CUDA test

1. PyTest: Add device_helpers.cpp to pyabacus ModuleBase build
   - Fixes undefined symbol: get_device_type<DEVICE_CPU>

2. CUDA test: Add __CUDA definition for cusolver test target
   - The test includes diag_cusolver.cu which needs CHECK_CUDA macros
   - remove_definitions(-D__CUDA) at top of file removed the macro
   - Re-add it specifically for this CUDA test target

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Test: Fix DiagoCusolver test to match new diag() interface

Update the test to use the new 4-parameter diag() interface:
- Old: diag(&hmtest, psi, eigenvalue)
- New: diag(h_mat, s_mat, psi, eigenvalue)

The test now properly extracts MatrixBlock from HamiltTEST before
calling diag().

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Refactor: replace custom CUDA error checks with unified device_check.h macros in module_gint

Replace checkCuda/checkCudaLastError with CHECK_CUDA/CHECK_LAST_CUDA_ERROR from device_check.h
to unify CUDA error handling across the codebase.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Refactor: replace remaining checkCuda with CHECK_CUDA in module_gint GPU files

Continue refactoring to use unified device_check.h macros in all module_gint GPU implementation files.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Refactor: replace CUDA_CHECK with CHECK_CUDA in module_rt/kernels/cuda

Remove custom CUDA_CHECK macro from snap_psibeta_kernel.cuh and use unified
CHECK_CUDA from device_check.h for consistent CUDA error handling.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix CUDA pre-6.0 atomicAdd compat in vbatched GEMM

* Add device_helpers to Makefile objects

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
…ygen test and the container test more robust. (#6906)

* Update Doxyfile

* Add Force Clean Workspace step in workflow

Add step to force clean the workspace before checkout

* Change workspace cleanup path in devcontainer.yml

Updated the clean workspace step to remove specific directory.

* Modify Force Clean Workspace step in devcontainer.yml

Updated the Force Clean Workspace step to change ownership and delete contents.
…seful information for using Ylm in both CPU and GPU coding) (#6947)

* Refactor: Unify CUDA spherical harmonics (sph_harm) implementation

Extract common spherical harmonics computation into a shared header
(sph_harm_gpu.cuh) and remove duplicate implementations from gint
and rt modules. This improves code maintainability and ensures
consistent behavior across all CUDA kernels.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* add comments

* modify ylm.cpp

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
… for the following developments of pyabacus) (#6943)

* Fix: update pyabacus with AI code diagnosis

* Feature: add ModuleESolver in pyabacus, support ks_lcao only

* Feature: support pyabacus to run abacus directory

* Fix: another pyabacus in PyPI

* Refactor: add utils to simplify codes in pyabacus and add data interfaces in ESolver
* Fix double precision GPU bug by using GEMV instead of GEMM

It appears that GEMM with dimension 1 can be buggy for GPU (cuBLAS)

* Fix GPU single precision energy error in dav_subspace solver

  - Restore d_precondition host-to-device sync that was commented out in #5199
    (this caused uninitialized GPU memory to be used as the preconditioner)
  - Fix cuBLAS gemv calls using incx instead of incy for Y parameter
  - Fix gemv_batched using incy instead of incx for x parameter

  Fixes GPU single precision energy being ~0.027 eV off from correct value.

* Fix ROCm gemv incy parameter bug (same as CUDA fix)

Fixed 3 hipBLAS gemv calls that incorrectly used incx instead of incy
for the Y vector stride parameter:
- hipblasDgemv (double)
- hipblasCgemv (complex<float>)
- hipblasZgemv (complex<double>)

This is the same bug that was fixed in the CUDA version (math_kernel_op.cu).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Replace cudaErrCheck with CHECK_CUBLAS

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Xiaoyang Zhang <tsfxwbbzxy@163.com>
* replace libcal with NCCL

* update some docs

* add libcal compatibility

* Refactor cuSolverMp CMake setup and auto-select backend

* fix an error

* update toolchain doc

* update some comments

* change libcal to CAL

* remove meaningless comment
…#6955)

- Add version-specific module loading instructions (HPC-X for SDK < 25.9, NCCL for SDK >= 25.9)
- Add minimum version check (>= 0.4.0) in CMake configuration
- Simplify documentation by removing manual installation option

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Replace `inline constexpr` with `static constexpr` in ylmcoef.h
to eliminate C++17 dependency, as the project only supports up to C++11.

Closes #6956

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Refactor: Encapsulate timer functionality in timer_wrapper.h

* Refactor timer code and clean_esolver function

1. Remove #ifdef __MPI from timer code, encapsulate in timer_wrapper.h
2. Move ESolver clean logic to after_all_runners method
3. Replace clean_esolver calls with direct delete p_esolver
4. Remove #ifdef __MPI from delete p_esolver
5. Add Cblacs_exit(1) in after_all_runners for LCAO calculations

* add module_energy directory

* updates

* Rename json_output to module_json and move para_json files, update include paths

* Update CMakeLists.txt: change json_output to module_json

* Fix CMakeLists.txt: update source_io file paths to module_output directory

* Fix csr_reader.h include paths: update to module_output directory

* fix bugs related to libxc

* fix

* fix

* fix several CMakeLists

* update CMake and other test files

* update cmakelists

* fix bugs

* Fix: Correct para_json.cpp path in test CMakeLists.txt

* fix cmake

* fix

* fix

* fix

* fix

* fix

* json!

---------

Co-authored-by: abacus_fixer <mohanchen@pku.eud.cn>
* docs: Update example and docs for GPU-LCAO acceleration

* docs(cuda):  clarify multi-cards setting
* fix comupte bug

* clean format

* add change

* add exp

* fix bug

* fix compute bug

* fix avoid compute in libm

* add truncated func
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.