2026PKUCourseHW5:Fix file open check in utils.cpp#358
2026PKUCourseHW5:Fix file open check in utils.cpp#358derekyjy wants to merge 291 commits intoabacusmodeling:developfrom
Conversation
* feat pexsi * fix : diag not completed * feat * feat: pexsi hsolver * CMake building implemented * Works * adapt to the new container * Turn off USE_PEXSI * Update LibRI to 553c91c * modify include files * namespace-ize * new inputs added * Configure Makefile Compiling, fix typos * Fix Makefile Intel toolchains compile errors * Fix even more PEXSI related Makefile compiling issues * Modify inputs and update to latest version (abacusmodeling#2) * run INPUT.Default() in every process in InputParaTest (#3490) Co-authored-by: kirk0830 <67682086+kirk0830@users.noreply.github.com> * add blas support for FindLAPACK.cmake (#3497) * more unittest of QO: towards orbital selection (#3499) * Fix: fix bug in mulliken charge calculation (#3503) * fix phase * fix case test * Refactor: namespace Conv_Coulomb_Pot_K (#3446) * Refactor: namespace Conv_Coulomb_Pot_K * Refactor: namespace Conv_Coulomb_Pot_K --------- Co-authored-by: wqzhou <33364058+WHUweiqingzhou@users.noreply.github.com> * enable the computation of all zeros in one function call (#3449) Co-authored-by: wqzhou <33364058+WHUweiqingzhou@users.noreply.github.com> * replace ios.eof() by ios.good() to avoid meeting badbit and failbit in reading STRU (#3506) * Build: add ccache to accelerate the testing process (#3509) * Build: add ccache to accelerate the testing process * Update test.yml * Update test.yml * Update test.yml * Docs: to avoid the misunderstanding in docs (#3518) * to avoid the misunderstanding in docs * Update docs/quick_start/hands_on.md Co-authored-by: Chun Cai <amoycaic@gmail.com> --------- Co-authored-by: Chun Cai <amoycaic@gmail.com> * Docs: fix a missing depencency in conda build env (#3508) * Feature: Add ENABLE_RAPIDJSON option to control the output of abacus.json (#3519) Add ENABLE_RAPIDJSON option to control the output of abacus.json * Feature: add python wrapper for math sphbes (#3475) * recommit for review * add python wrapper * remove timer since performace tests add * Feature: support segment split in kline mode in KPT file and `out_band` band output precision control, `8` as default (#3493) * add precision control * correct serial version of nscf_band function * fix issue 3482 * update unit and integrated test * update document * correct unittest and make compatible with false and true * fix: bug in Autotest.sh when result.ref has no totaltimeref (#3523) * Fix : unit test of module_xc (#3524) * Fix: omit small magnetic moments to avoid numerical instability (#3530) * update deltalambda * avoid numerical error in orbMulP * add constrain on Mi * change case reference value * Fix: fix multiple compiler warnings (#3515) * Fix: add noreturn attribute to warning_quit * Add type conversion * fix string literal * fix small number trunctuation * Fix system call returned value not checked * fix missing braket * Refactor parameter_pool.cpp and parameter_pool.h * remove duplicated return statements * Change WARNING_QUIT occurances in tests * Add warning message to help debug UT * output the default precision flag (#3496) Co-authored-by: kirk0830 <67682086+kirk0830@users.noreply.github.com> * Build: Improving CMake performance for finding LibXC and ELPA (#3478) * Fix for finding LibXC and ELPA * For compatibility to previous routines * syntax fix for FindELPA.cmake * Update cmake/FindELPA.cmake Co-authored-by: Chun Cai <amoycaic@gmail.com> * Using CMake interface as default for finding LibXC * update docs * fix for FindLibxc: changing imcompatible if statement * fix for FindLibxc: changing imcompatible if statement * fix for FindLibxc: changing imcompatible if statement * update docs for installing pkg-config * Update FindLibxc.cmake * Update FindLibxc.cmake * remove previous LibXC routine in CMakeLists.txt Co-authored-by: Chun Cai <amoycaic@gmail.com> * Update easy_install.md with Makefile-built LibXC supported * Update easy_install.md to include different behavior in different version on finding ELPA --------- Co-authored-by: Chun Cai <amoycaic@gmail.com> * Docs: correct some docs about mp2 smearing method (#3533) * correct some docs about mp2 smearing method * add docs about mv method * Feature : printing band density (#3501) Co-authored-by: wenfei-li <liwenfei@gmail.com> Co-authored-by: wqzhou <33364058+WHUweiqingzhou@users.noreply.github.com> * add some docs for PR#3501 (#3537) * Feature: enable restart charge density mixing during SCF (#3542) * add a new parameter mixing_restart * do not update rho if iter==mixing_restart * do not update rho if iter==mixing_restart-1 * reset mix and rho_mdata if iter==mixing_restart * fix SCF exit directly since drho=0 if iter=GlobalV::MIXING_RESTART * re-set_mixing in eachiterinit for PW and LCAO * enable SCF restarts in esolver_ks::RUN * add some UnitTests * add some Docs * new inputs added * Update input-main.md (#3551) Solve the format problem mentioned in issue 3543 * Build: fix compatibility issue against toolchain install (#3540) * Fix for finding LibXC and ELPA * For compatibility to previous routines * syntax fix for FindELPA.cmake * Update cmake/FindELPA.cmake Co-authored-by: Chun Cai <amoycaic@gmail.com> * Using CMake interface as default for finding LibXC * update docs * fix for FindLibxc: changing imcompatible if statement * fix for FindLibxc: changing imcompatible if statement * fix for FindLibxc: changing imcompatible if statement * update docs for installing pkg-config * Update FindLibxc.cmake * Update FindLibxc.cmake * remove previous LibXC routine in CMakeLists.txt Co-authored-by: Chun Cai <amoycaic@gmail.com> * Update easy_install.md with Makefile-built LibXC supported * Update easy_install.md to include different behavior in different version on finding ELPA * fix compatibility issue against toolchain * Change default ELPA install routine to old one --------- Co-authored-by: Chun Cai <amoycaic@gmail.com> * Test: Configure performance tests for math libraries (#3511) * add performace test of sphbes functions. * fix benchmark cmake errors * add dependencies for docker * update docs * add performance tests for sphbes * add google benchmark * rewrite benchmark tests in fixtures * disable internal testing in benchmark * merge benchmark into integration test --------- Co-authored-by: StarGrys <771582678@qq.com> * Configure Makefile Compiling, fix typos * Fix Makefile Intel toolchains compile errors * Fix even more PEXSI related Makefile compiling issues * Update hsolver_pw.cpp (#3556) when use_uspp==false, overlap matrix should be E. * Fix: cuda build target (#3276) * Fix: cuda buid target * Update CMakeLists.txt --------- Co-authored-by: Denghui Lu <denghuilu@pku.edu.cn> --------- Co-authored-by: wqzhou <33364058+WHUweiqingzhou@users.noreply.github.com> Co-authored-by: kirk0830 <67682086+kirk0830@users.noreply.github.com> Co-authored-by: Haozhi Han <haozhi.han@outlook.com> Co-authored-by: Zhao Tianqi <hongriTianqi@users.noreply.github.com> Co-authored-by: PeizeLin <78645006+PeizeLin@users.noreply.github.com> Co-authored-by: jinzx10 <jzx016@hotmail.com> Co-authored-by: Chun Cai <amoycaic@gmail.com> Co-authored-by: Peng Xingliang <91927439+pxlxingliang@users.noreply.github.com> Co-authored-by: Jie Li <76780849+jieli-matrix@users.noreply.github.com> Co-authored-by: Wenfei Li <38569667+wenfei-li@users.noreply.github.com> Co-authored-by: Denghui Lu <denghuilu@pku.edu.cn> Co-authored-by: YI Zeping <18586016708@163.com> Co-authored-by: wenfei-li <liwenfei@gmail.com> Co-authored-by: jingan-181 <78459531+jingan-181@users.noreply.github.com> Co-authored-by: StarGrys <771582678@qq.com> Co-authored-by: Haozhi Han <haozhi.han@stu.pku.edu.cn> * Revert "Modify inputs and update to latest version" * Update FindPEXSI.cmake to fix Comments * Fix CI errors * Fix CI Errors and Merge with Upstream * Resolve Pull Request Reviews * Fix parallel communication related issue * Fix vars in Makefile.vars, add input tests and comments for pexsi vars * Fix nspin > 1 cases * Improvement: take calculated mu as new initial guess, may slightly improve performance * Fix mistakes in the last commit * Fix: params and features - set default pexsi_temp - fix md in pexsi * fix empty lines * Fix: move params to pexsi_solver, rename USE_PEXSI to ENABLE_PEXSI * Docs: added docs for pexsi inputs * Fix unit test issues in input_conv * 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 * Fix Compile errors * refactor to abandon `pdiagh` * Fix mu_buffer and nspin * Updates with latest * Refactor: in ESolver_KS_PW, calculate deband in iter_finish, not in hamilt2density * Fix: make files in consistent with upstream * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor: fix unit test * Refactor: fix unit test * Refactor: fix unit test * Refactor: fix unit test * 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 * Fix: Compile Error on CUDA > 12.9 * Fix: Compile Error on CUDA > 12.9 * Feature: Support linear combination of coulomb_param for EXX PW * Fix: Fix compile issue * 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 * Fix: Integrate test * Refactor * Refactor * Refactor * Refactor * Refactor * 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 --------- Co-authored-by: zhangzhihao <1900017707@pku.edu.cn> Co-authored-by: zhangzh-pku <64026312+zhangzh-pku@users.noreply.github.com> Co-authored-by: wqzhou <33364058+WHUweiqingzhou@users.noreply.github.com> Co-authored-by: kirk0830 <67682086+kirk0830@users.noreply.github.com> Co-authored-by: Haozhi Han <haozhi.han@outlook.com> Co-authored-by: Zhao Tianqi <hongriTianqi@users.noreply.github.com> Co-authored-by: PeizeLin <78645006+PeizeLin@users.noreply.github.com> Co-authored-by: jinzx10 <jzx016@hotmail.com> Co-authored-by: Chun Cai <amoycaic@gmail.com> Co-authored-by: Peng Xingliang <91927439+pxlxingliang@users.noreply.github.com> Co-authored-by: Jie Li <76780849+jieli-matrix@users.noreply.github.com> Co-authored-by: Wenfei Li <38569667+wenfei-li@users.noreply.github.com> Co-authored-by: Denghui Lu <denghuilu@pku.edu.cn> Co-authored-by: YI Zeping <18586016708@163.com> Co-authored-by: wenfei-li <liwenfei@gmail.com> Co-authored-by: jingan-181 <78459531+jingan-181@users.noreply.github.com> Co-authored-by: StarGrys <771582678@qq.com> Co-authored-by: Haozhi Han <haozhi.han@stu.pku.edu.cn> Co-authored-by: Mohan Chen <mohan.chen.chen.mohan@gmail.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: Taoni Bao <baotaoni@pku.edu.cn> Co-authored-by: Chen Nuo <49788094+Cstandardlib@users.noreply.github.com>
* Move module_fft to source_base * Fix test build error * Rename namespace * Fix CUDA test error * Fix CUDA test bug * 2 * Finally fix CUDA test error * Finally fix fix test error
…w. (#6490) * Feature: add DFT-1/2 and shell DFT-1/2, currently only support PW esolver_ks_pw. * Added Sep, Sep_Cell, and VSep to organize the self-energy potential of DFT-1/2 * Added a new effective potential pot_sep for calculating the self-energy potential * Added initialization of the self-energy potential in the esolver_ks_pw control flow * Added the keyword SEP_FILES in the STRU file for reading self-energy potential files * Added the dfthalf_type keyword in INPUT to enable DFT-1/2 and shell DFT-1/2 * Fix: Compilation error in DeepKS unit tests after adding DFT-1/2 * Fix: Add the additional files to Makefile.Objects * Build(deps): Bump actions/setup-python from 5 to 6 (#6492) Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@v5...v6) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [Refactor] Move hardware initializer out from esolver code (#6494) * Move hardware initializer out from esolver * Remove useless codes * Remove finalize code out * Feature: support NVTX profiling via timer_enable_nvtx flag (#6495) * Feature: support NVTX profiling via timer_enable_nvtx flag Signed-off-by:Tianxiang Wang<tianxiang.wang@metax-tech.com>, Contributed under MetaX Integrated Circuits (Shanghai) Co., Ltd. * Add timer_enable_nvtx section in markdown Signed-off-by:Tianxiang Wang<tianxiang.wang@metax-tech.com>, Contributed under MetaX Integrated Circuits (Shanghai) Co., Ltd. * Fix: Use __USE_NVTX macro to avoid NVTX linking errors in tests. Clarify in docs that timer_enable_nvtx parameter only takes effect on CUDA platforms. Signed-off-by:Tianxiang Wang<tianxiang.wang@metax-tech.com>, Contributed under MetaX Integrated Circuits (Shanghai) Co., Ltd. * Perf: Optimize Davidson by fusing operators, offloading CPU computation to GPU, and reducing memory transfers (#6493) * Perf: Optimize Diago_DavSubspace with GPU operators by adding and fusing custom kernels. Signed-off-by:Tianxiang Wang<tianxiang.wang@metax-tech.com>, Contributed under MetaX Integrated Circuits (Shanghai) Co., Ltd. * Perf: reduce memory allocation and copy in Diago_DavSubspace::diag_zhegvx Signed-off-by:Tianxiang Wang<tianxiang.wang@metax-tech.com>, Contributed under MetaX Integrated Circuits (Shanghai) Co., Ltd. * Perf: Replace loop-based 2D copy and memset with memcpy_2d_op, memset_2d_op Signed-off-by:Tianxiang Wang<tianxiang.wang@metax-tech.com>, Contributed under MetaX Integrated Circuits (Shanghai) Co., Ltd. * Perf: use warp reduce instead of shared memory for better efficiency Signed-off-by:Tianxiang Wang<tianxiang.wang@metax-tech.com>, Contributed under MetaX Integrated Circuits (Shanghai) Co., Ltd. * Fix compilation error Signed-off-by:Tianxiang Wang<tianxiang.wang@metax-tech.com>, Contributed under MetaX Integrated Circuits (Shanghai) Co., Ltd. * Fix: resolve compile error with USE_ELPA=OFF + BUILD_TESTING=ON and switch to nvtx3 headers when CUDA_VERSION >= 12090 (#6497) * Fix: switch to nvtx3 headers when CUDA_VERSION >= 12090 Signed-off-by:Tianxiang Wang<tianxiang.wang@metax-tech.com>, Contributed under MetaX Integrated Circuits (Shanghai) Co., Ltd. * Fix: resolve compile error with USE_ELPA=OFF + BUILD_TESTING=ON Signed-off-by:Tianxiang Wang<tianxiang.wang@metax-tech.com>, Contributed under MetaX Integrated Circuits (Shanghai) Co., Ltd. * Fix dsp compilation problem (#6499) * Fix: Fix crash in Debug build with multi-GPU due to forced cudaSetDevice(0) (#6498) Signed-off-by:Tianxiang Wang<tianxiang.wang@metax-tech.com>, Contributed under MetaX Integrated Circuits (Shanghai) Co., Ltd. * Removed the temporary variable DMRGint_full when transitioning from 2D block parallelism to serial in Hcontainer(develop) (#6489) * delete tem Hcontainer to reduce memory usage * simplify the compute code * change DM2D_tmp to dm2d_tmp, use vector instead of new * Update version to 3.9.0.14 (#6504) * Refactor: Remove the GlobalC from sep_cell and vsep_cell * Removed GlobalC::sep_cell and GlobalC::vsep_cell from GlobalC * Integrated sep_cell into UnitCell * Integrated vsep_cell into esolver_ks_pw * Added empty constructors and destructors for Sep_Pot and Sep_Cell to facilitate unit testing compilation --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Critsium <tsfxwbbzxy@163.com> Co-authored-by: Tianxiang Wang <mail.txwang@qq.com> Co-authored-by: zgn-26714 <3022939753@qq.com> Co-authored-by: Erjie Wu <110683255+ErjieWu@users.noreply.github.com> Co-authored-by: Mohan Chen <mohanchen@pku.edu.cn>
* add iter and itep into the output wave function file name in pw basis, change out_interval to out_freq_ion * fix bugs, default value of out_freq_ion is 0, if one needs out_freq_elec, he/she should first turn on out_freq_ion * fix bug in read_input_ptest * fix bug in read_input_item_test.cpp * read_wfc * update output file names of command out_wfc_pw * update description for out_wfc_pw * add inp into lcao_after_scf * update out_chg and out_pot * update elf * chagne eigs1.txt to eig.txt, change eig.txt to eig_occ.txt * update output of pw documents * update output of pw basis set * update dos and eig and eig_occ to adapt to g index * fix bugs in pw outputs * change chgs1 to chg * update file names and fix small bugs * out_dos update * update and fix band.txt * fix bug * update catch_properties, can deal with nspin=2 case to print wave function in pw basis * fix bug in 072_PW_ELF * fix 054 056 057 examples in 01_PW * fix 01_PW 100 * fix mulliken charge output * fix bugs in 02_NAO_Gamma * fix bugs in 03_NAO_multik * update to fix bugs in 03_NAO_multik * remove k in hkk1.txt skk1.txt tkk1.txt * update output formats * do not output ks_pw dos when performing SDFT calculations * add parameter in 007_PW_OW_GPU * update result.ref * fix some chg files * delete out_interval in INPUT * update documents * update 01_PW/203 example * update chage step -1 * fix bugs * fix bug in 23 example * fix bug * fix OFDFT example * fix bug in EXX
* feat pexsi * fix : diag not completed * feat * feat: pexsi hsolver * CMake building implemented * Works * adapt to the new container * Turn off USE_PEXSI * Update LibRI to 553c91c * modify include files * namespace-ize * new inputs added * Configure Makefile Compiling, fix typos * Fix Makefile Intel toolchains compile errors * Fix even more PEXSI related Makefile compiling issues * Modify inputs and update to latest version (abacusmodeling#2) * run INPUT.Default() in every process in InputParaTest (#3490) Co-authored-by: kirk0830 <67682086+kirk0830@users.noreply.github.com> * add blas support for FindLAPACK.cmake (#3497) * more unittest of QO: towards orbital selection (#3499) * Fix: fix bug in mulliken charge calculation (#3503) * fix phase * fix case test * Refactor: namespace Conv_Coulomb_Pot_K (#3446) * Refactor: namespace Conv_Coulomb_Pot_K * Refactor: namespace Conv_Coulomb_Pot_K --------- Co-authored-by: wqzhou <33364058+WHUweiqingzhou@users.noreply.github.com> * enable the computation of all zeros in one function call (#3449) Co-authored-by: wqzhou <33364058+WHUweiqingzhou@users.noreply.github.com> * replace ios.eof() by ios.good() to avoid meeting badbit and failbit in reading STRU (#3506) * Build: add ccache to accelerate the testing process (#3509) * Build: add ccache to accelerate the testing process * Update test.yml * Update test.yml * Update test.yml * Docs: to avoid the misunderstanding in docs (#3518) * to avoid the misunderstanding in docs * Update docs/quick_start/hands_on.md Co-authored-by: Chun Cai <amoycaic@gmail.com> --------- Co-authored-by: Chun Cai <amoycaic@gmail.com> * Docs: fix a missing depencency in conda build env (#3508) * Feature: Add ENABLE_RAPIDJSON option to control the output of abacus.json (#3519) Add ENABLE_RAPIDJSON option to control the output of abacus.json * Feature: add python wrapper for math sphbes (#3475) * recommit for review * add python wrapper * remove timer since performace tests add * Feature: support segment split in kline mode in KPT file and `out_band` band output precision control, `8` as default (#3493) * add precision control * correct serial version of nscf_band function * fix issue 3482 * update unit and integrated test * update document * correct unittest and make compatible with false and true * fix: bug in Autotest.sh when result.ref has no totaltimeref (#3523) * Fix : unit test of module_xc (#3524) * Fix: omit small magnetic moments to avoid numerical instability (#3530) * update deltalambda * avoid numerical error in orbMulP * add constrain on Mi * change case reference value * Fix: fix multiple compiler warnings (#3515) * Fix: add noreturn attribute to warning_quit * Add type conversion * fix string literal * fix small number trunctuation * Fix system call returned value not checked * fix missing braket * Refactor parameter_pool.cpp and parameter_pool.h * remove duplicated return statements * Change WARNING_QUIT occurances in tests * Add warning message to help debug UT * output the default precision flag (#3496) Co-authored-by: kirk0830 <67682086+kirk0830@users.noreply.github.com> * Build: Improving CMake performance for finding LibXC and ELPA (#3478) * Fix for finding LibXC and ELPA * For compatibility to previous routines * syntax fix for FindELPA.cmake * Update cmake/FindELPA.cmake Co-authored-by: Chun Cai <amoycaic@gmail.com> * Using CMake interface as default for finding LibXC * update docs * fix for FindLibxc: changing imcompatible if statement * fix for FindLibxc: changing imcompatible if statement * fix for FindLibxc: changing imcompatible if statement * update docs for installing pkg-config * Update FindLibxc.cmake * Update FindLibxc.cmake * remove previous LibXC routine in CMakeLists.txt Co-authored-by: Chun Cai <amoycaic@gmail.com> * Update easy_install.md with Makefile-built LibXC supported * Update easy_install.md to include different behavior in different version on finding ELPA --------- Co-authored-by: Chun Cai <amoycaic@gmail.com> * Docs: correct some docs about mp2 smearing method (#3533) * correct some docs about mp2 smearing method * add docs about mv method * Feature : printing band density (#3501) Co-authored-by: wenfei-li <liwenfei@gmail.com> Co-authored-by: wqzhou <33364058+WHUweiqingzhou@users.noreply.github.com> * add some docs for PR#3501 (#3537) * Feature: enable restart charge density mixing during SCF (#3542) * add a new parameter mixing_restart * do not update rho if iter==mixing_restart * do not update rho if iter==mixing_restart-1 * reset mix and rho_mdata if iter==mixing_restart * fix SCF exit directly since drho=0 if iter=GlobalV::MIXING_RESTART * re-set_mixing in eachiterinit for PW and LCAO * enable SCF restarts in esolver_ks::RUN * add some UnitTests * add some Docs * new inputs added * Update input-main.md (#3551) Solve the format problem mentioned in issue 3543 * Build: fix compatibility issue against toolchain install (#3540) * Fix for finding LibXC and ELPA * For compatibility to previous routines * syntax fix for FindELPA.cmake * Update cmake/FindELPA.cmake Co-authored-by: Chun Cai <amoycaic@gmail.com> * Using CMake interface as default for finding LibXC * update docs * fix for FindLibxc: changing imcompatible if statement * fix for FindLibxc: changing imcompatible if statement * fix for FindLibxc: changing imcompatible if statement * update docs for installing pkg-config * Update FindLibxc.cmake * Update FindLibxc.cmake * remove previous LibXC routine in CMakeLists.txt Co-authored-by: Chun Cai <amoycaic@gmail.com> * Update easy_install.md with Makefile-built LibXC supported * Update easy_install.md to include different behavior in different version on finding ELPA * fix compatibility issue against toolchain * Change default ELPA install routine to old one --------- Co-authored-by: Chun Cai <amoycaic@gmail.com> * Test: Configure performance tests for math libraries (#3511) * add performace test of sphbes functions. * fix benchmark cmake errors * add dependencies for docker * update docs * add performance tests for sphbes * add google benchmark * rewrite benchmark tests in fixtures * disable internal testing in benchmark * merge benchmark into integration test --------- Co-authored-by: StarGrys <771582678@qq.com> * Configure Makefile Compiling, fix typos * Fix Makefile Intel toolchains compile errors * Fix even more PEXSI related Makefile compiling issues * Update hsolver_pw.cpp (#3556) when use_uspp==false, overlap matrix should be E. * Fix: cuda build target (#3276) * Fix: cuda buid target * Update CMakeLists.txt --------- Co-authored-by: Denghui Lu <denghuilu@pku.edu.cn> --------- Co-authored-by: wqzhou <33364058+WHUweiqingzhou@users.noreply.github.com> Co-authored-by: kirk0830 <67682086+kirk0830@users.noreply.github.com> Co-authored-by: Haozhi Han <haozhi.han@outlook.com> Co-authored-by: Zhao Tianqi <hongriTianqi@users.noreply.github.com> Co-authored-by: PeizeLin <78645006+PeizeLin@users.noreply.github.com> Co-authored-by: jinzx10 <jzx016@hotmail.com> Co-authored-by: Chun Cai <amoycaic@gmail.com> Co-authored-by: Peng Xingliang <91927439+pxlxingliang@users.noreply.github.com> Co-authored-by: Jie Li <76780849+jieli-matrix@users.noreply.github.com> Co-authored-by: Wenfei Li <38569667+wenfei-li@users.noreply.github.com> Co-authored-by: Denghui Lu <denghuilu@pku.edu.cn> Co-authored-by: YI Zeping <18586016708@163.com> Co-authored-by: wenfei-li <liwenfei@gmail.com> Co-authored-by: jingan-181 <78459531+jingan-181@users.noreply.github.com> Co-authored-by: StarGrys <771582678@qq.com> Co-authored-by: Haozhi Han <haozhi.han@stu.pku.edu.cn> * Revert "Modify inputs and update to latest version" * Update FindPEXSI.cmake to fix Comments * Fix CI errors * Fix CI Errors and Merge with Upstream * Resolve Pull Request Reviews * Fix parallel communication related issue * Fix vars in Makefile.vars, add input tests and comments for pexsi vars * Fix nspin > 1 cases * Improvement: take calculated mu as new initial guess, may slightly improve performance * Fix mistakes in the last commit * Fix: params and features - set default pexsi_temp - fix md in pexsi * fix empty lines * Fix: move params to pexsi_solver, rename USE_PEXSI to ENABLE_PEXSI * Docs: added docs for pexsi inputs * Fix unit test issues in input_conv * 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 * Fix Compile errors * refactor to abandon `pdiagh` * Fix mu_buffer and nspin * Updates with latest * Refactor: in ESolver_KS_PW, calculate deband in iter_finish, not in hamilt2density * Fix: make files in consistent with upstream * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor: fix unit test * Refactor: fix unit test * Refactor: fix unit test * Refactor: fix unit test * 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 * Fix: Compile Error on CUDA > 12.9 * Fix: Compile Error on CUDA > 12.9 * Feature: Support linear combination of coulomb_param for EXX PW * Fix: Fix compile issue * 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 * Fix: Integrate test * Refactor * Refactor * Refactor * Refactor * Refactor * 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 --------- Co-authored-by: zhangzhihao <1900017707@pku.edu.cn> Co-authored-by: zhangzh-pku <64026312+zhangzh-pku@users.noreply.github.com> Co-authored-by: wqzhou <33364058+WHUweiqingzhou@users.noreply.github.com> Co-authored-by: kirk0830 <67682086+kirk0830@users.noreply.github.com> Co-authored-by: Haozhi Han <haozhi.han@outlook.com> Co-authored-by: Zhao Tianqi <hongriTianqi@users.noreply.github.com> Co-authored-by: PeizeLin <78645006+PeizeLin@users.noreply.github.com> Co-authored-by: jinzx10 <jzx016@hotmail.com> Co-authored-by: Chun Cai <amoycaic@gmail.com> Co-authored-by: Peng Xingliang <91927439+pxlxingliang@users.noreply.github.com> Co-authored-by: Jie Li <76780849+jieli-matrix@users.noreply.github.com> Co-authored-by: Wenfei Li <38569667+wenfei-li@users.noreply.github.com> Co-authored-by: Denghui Lu <denghuilu@pku.edu.cn> Co-authored-by: YI Zeping <18586016708@163.com> Co-authored-by: wenfei-li <liwenfei@gmail.com> Co-authored-by: jingan-181 <78459531+jingan-181@users.noreply.github.com> Co-authored-by: StarGrys <771582678@qq.com> Co-authored-by: Haozhi Han <haozhi.han@stu.pku.edu.cn> Co-authored-by: Mohan Chen <mohan.chen.chen.mohan@gmail.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: Taoni Bao <baotaoni@pku.edu.cn> Co-authored-by: Chen Nuo <49788094+Cstandardlib@users.noreply.github.com>
* Plug memory leak in dav_subspace destructor * Rename hphi and sphi to hpsi and spsi
* update out_freq_ion description * update chg_init and pot_init files * cannot run, but we have include ctrl_output_fp files * move some files from esolver_fp to ctrl_output_fp * fix a bug * move ctrl_output_fp to pw part
* update small places in charge_mixing_residual.cpp * update charge_mixing_preconditioner * add timers and remove some PARAM.inp.nspin * fix problems * add timers * small fix * fix a potential memory leak * fix bug
* Rename dnevx to heevx * Update comments * Rename dngvd to hegvd * Rename dngvx to hegvx
…actually. (#6541) * update small places in charge_mixing_residual.cpp * update charge_mixing_preconditioner * add timers and remove some PARAM.inp.nspin * fix problems * add timers * small fix * fix a potential memory leak * fix bug * add ctrl_output_pw files but cannot run now * add some interfaces in ctrl_output_pw * keep fixing bugs * successfully compile the codes * finally I understand Devicegit add ../source/source_base/module_device/device.h ../source/source_io/ctrl_output_pw.cpp ../source/source_io/ctrl_output_pw.h! * update function variables * one step further * move on * update codes, done! * fix bug
* Use new mtblas library * Update annotations * Modify fft
* Rename dngvd to hegvd, add comment & docs * Update hegvd_op docs * Rename source files * Change dngv/dnev to hegv/heev in source * Rename pyabacus dngvd
* add esolver_of_tddft * esolver_of_tddft cmakelist * move memeber function of esolver_of_tddft to module_ofdft * fix bug (confuse evolve_psi with evolve_phi) * change evolve_phi with evolve_ofdft; change to vector * details * code optimization * add situation of reading charge file for tdofdft --------- Co-authored-by: Liang Sun <50293369+sunliang98@users.noreply.github.com>
…2D block parallelism to serial in Hcontainer (develop) (#6510) * delete tem Hcontainer to reduce memory usage * simplify the compute code * change DM2D_tmp to dm2d_tmp, use vector instead of new * delete hr_gint_full_ to reduce memory * add serial code * fix bug * fix a not declare bug * fix serial bug * Fix the issue of not resetting to zero in the loop * resolve confilct * resolve confilct * Change the names to comply with the conventions
… libtorch-gpu. (#6551) * Update exx_cal_energy_op.cu fix the errors related to the "atomicAdd" function. * Update phi_operator_kernel.cu * Update gemm_tn_vbatch.cuh * Update gemm_nn_vbatch.cuh * Update dgemm_vbatch.cu
* Update subspace_func where needed * Refactor hsolver function to do subspace diagonalization, standard & generalized, used in cg * Rename heevx params * Update corresponding tests * update pyabacus contributing md * Update corresponding pyabacus code and remove need_subspace in dav_subspace code * Update pyabacus api * Fix typo
* Fix: Fix the errors in building abacus with libtorch-gpu * Fix: Mark submodule directory as safe for CI workflow * Fix: Update CI workflow to manually handle submodules and set safe directories * Fix: Update CI workflow to handle submodule ownership and initialization * Fix: Add conditional compilation for CUDA and ROCM in MLKEDF descriptor functions * Fix: Refactor Psi constructor to separate declaration and implementation for better readability and maintainability * Fix: Improve code readability by adding colons to constructor comments and formatting memory operations
…on the fly (#6560) * feat pexsi * fix : diag not completed * feat * feat: pexsi hsolver * CMake building implemented * Works * adapt to the new container * Turn off USE_PEXSI * Update LibRI to 553c91c * modify include files * namespace-ize * new inputs added * Configure Makefile Compiling, fix typos * Fix Makefile Intel toolchains compile errors * Fix even more PEXSI related Makefile compiling issues * Modify inputs and update to latest version (abacusmodeling#2) * run INPUT.Default() in every process in InputParaTest (#3490) Co-authored-by: kirk0830 <67682086+kirk0830@users.noreply.github.com> * add blas support for FindLAPACK.cmake (#3497) * more unittest of QO: towards orbital selection (#3499) * Fix: fix bug in mulliken charge calculation (#3503) * fix phase * fix case test * Refactor: namespace Conv_Coulomb_Pot_K (#3446) * Refactor: namespace Conv_Coulomb_Pot_K * Refactor: namespace Conv_Coulomb_Pot_K --------- Co-authored-by: wqzhou <33364058+WHUweiqingzhou@users.noreply.github.com> * enable the computation of all zeros in one function call (#3449) Co-authored-by: wqzhou <33364058+WHUweiqingzhou@users.noreply.github.com> * replace ios.eof() by ios.good() to avoid meeting badbit and failbit in reading STRU (#3506) * Build: add ccache to accelerate the testing process (#3509) * Build: add ccache to accelerate the testing process * Update test.yml * Update test.yml * Update test.yml * Docs: to avoid the misunderstanding in docs (#3518) * to avoid the misunderstanding in docs * Update docs/quick_start/hands_on.md Co-authored-by: Chun Cai <amoycaic@gmail.com> --------- Co-authored-by: Chun Cai <amoycaic@gmail.com> * Docs: fix a missing depencency in conda build env (#3508) * Feature: Add ENABLE_RAPIDJSON option to control the output of abacus.json (#3519) Add ENABLE_RAPIDJSON option to control the output of abacus.json * Feature: add python wrapper for math sphbes (#3475) * recommit for review * add python wrapper * remove timer since performace tests add * Feature: support segment split in kline mode in KPT file and `out_band` band output precision control, `8` as default (#3493) * add precision control * correct serial version of nscf_band function * fix issue 3482 * update unit and integrated test * update document * correct unittest and make compatible with false and true * fix: bug in Autotest.sh when result.ref has no totaltimeref (#3523) * Fix : unit test of module_xc (#3524) * Fix: omit small magnetic moments to avoid numerical instability (#3530) * update deltalambda * avoid numerical error in orbMulP * add constrain on Mi * change case reference value * Fix: fix multiple compiler warnings (#3515) * Fix: add noreturn attribute to warning_quit * Add type conversion * fix string literal * fix small number trunctuation * Fix system call returned value not checked * fix missing braket * Refactor parameter_pool.cpp and parameter_pool.h * remove duplicated return statements * Change WARNING_QUIT occurances in tests * Add warning message to help debug UT * output the default precision flag (#3496) Co-authored-by: kirk0830 <67682086+kirk0830@users.noreply.github.com> * Build: Improving CMake performance for finding LibXC and ELPA (#3478) * Fix for finding LibXC and ELPA * For compatibility to previous routines * syntax fix for FindELPA.cmake * Update cmake/FindELPA.cmake Co-authored-by: Chun Cai <amoycaic@gmail.com> * Using CMake interface as default for finding LibXC * update docs * fix for FindLibxc: changing imcompatible if statement * fix for FindLibxc: changing imcompatible if statement * fix for FindLibxc: changing imcompatible if statement * update docs for installing pkg-config * Update FindLibxc.cmake * Update FindLibxc.cmake * remove previous LibXC routine in CMakeLists.txt Co-authored-by: Chun Cai <amoycaic@gmail.com> * Update easy_install.md with Makefile-built LibXC supported * Update easy_install.md to include different behavior in different version on finding ELPA --------- Co-authored-by: Chun Cai <amoycaic@gmail.com> * Docs: correct some docs about mp2 smearing method (#3533) * correct some docs about mp2 smearing method * add docs about mv method * Feature : printing band density (#3501) Co-authored-by: wenfei-li <liwenfei@gmail.com> Co-authored-by: wqzhou <33364058+WHUweiqingzhou@users.noreply.github.com> * add some docs for PR#3501 (#3537) * Feature: enable restart charge density mixing during SCF (#3542) * add a new parameter mixing_restart * do not update rho if iter==mixing_restart * do not update rho if iter==mixing_restart-1 * reset mix and rho_mdata if iter==mixing_restart * fix SCF exit directly since drho=0 if iter=GlobalV::MIXING_RESTART * re-set_mixing in eachiterinit for PW and LCAO * enable SCF restarts in esolver_ks::RUN * add some UnitTests * add some Docs * new inputs added * Update input-main.md (#3551) Solve the format problem mentioned in issue 3543 * Build: fix compatibility issue against toolchain install (#3540) * Fix for finding LibXC and ELPA * For compatibility to previous routines * syntax fix for FindELPA.cmake * Update cmake/FindELPA.cmake Co-authored-by: Chun Cai <amoycaic@gmail.com> * Using CMake interface as default for finding LibXC * update docs * fix for FindLibxc: changing imcompatible if statement * fix for FindLibxc: changing imcompatible if statement * fix for FindLibxc: changing imcompatible if statement * update docs for installing pkg-config * Update FindLibxc.cmake * Update FindLibxc.cmake * remove previous LibXC routine in CMakeLists.txt Co-authored-by: Chun Cai <amoycaic@gmail.com> * Update easy_install.md with Makefile-built LibXC supported * Update easy_install.md to include different behavior in different version on finding ELPA * fix compatibility issue against toolchain * Change default ELPA install routine to old one --------- Co-authored-by: Chun Cai <amoycaic@gmail.com> * Test: Configure performance tests for math libraries (#3511) * add performace test of sphbes functions. * fix benchmark cmake errors * add dependencies for docker * update docs * add performance tests for sphbes * add google benchmark * rewrite benchmark tests in fixtures * disable internal testing in benchmark * merge benchmark into integration test --------- Co-authored-by: StarGrys <771582678@qq.com> * Configure Makefile Compiling, fix typos * Fix Makefile Intel toolchains compile errors * Fix even more PEXSI related Makefile compiling issues * Update hsolver_pw.cpp (#3556) when use_uspp==false, overlap matrix should be E. * Fix: cuda build target (#3276) * Fix: cuda buid target * Update CMakeLists.txt --------- Co-authored-by: Denghui Lu <denghuilu@pku.edu.cn> --------- Co-authored-by: wqzhou <33364058+WHUweiqingzhou@users.noreply.github.com> Co-authored-by: kirk0830 <67682086+kirk0830@users.noreply.github.com> Co-authored-by: Haozhi Han <haozhi.han@outlook.com> Co-authored-by: Zhao Tianqi <hongriTianqi@users.noreply.github.com> Co-authored-by: PeizeLin <78645006+PeizeLin@users.noreply.github.com> Co-authored-by: jinzx10 <jzx016@hotmail.com> Co-authored-by: Chun Cai <amoycaic@gmail.com> Co-authored-by: Peng Xingliang <91927439+pxlxingliang@users.noreply.github.com> Co-authored-by: Jie Li <76780849+jieli-matrix@users.noreply.github.com> Co-authored-by: Wenfei Li <38569667+wenfei-li@users.noreply.github.com> Co-authored-by: Denghui Lu <denghuilu@pku.edu.cn> Co-authored-by: YI Zeping <18586016708@163.com> Co-authored-by: wenfei-li <liwenfei@gmail.com> Co-authored-by: jingan-181 <78459531+jingan-181@users.noreply.github.com> Co-authored-by: StarGrys <771582678@qq.com> Co-authored-by: Haozhi Han <haozhi.han@stu.pku.edu.cn> * Revert "Modify inputs and update to latest version" * Update FindPEXSI.cmake to fix Comments * Fix CI errors * Fix CI Errors and Merge with Upstream * Resolve Pull Request Reviews * Fix parallel communication related issue * Fix vars in Makefile.vars, add input tests and comments for pexsi vars * Fix nspin > 1 cases * Improvement: take calculated mu as new initial guess, may slightly improve performance * Fix mistakes in the last commit * Fix: params and features - set default pexsi_temp - fix md in pexsi * fix empty lines * Fix: move params to pexsi_solver, rename USE_PEXSI to ENABLE_PEXSI * Docs: added docs for pexsi inputs * Fix unit test issues in input_conv * 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 * Fix Compile errors * refactor to abandon `pdiagh` * Fix mu_buffer and nspin * Updates with latest * Refactor: in ESolver_KS_PW, calculate deband in iter_finish, not in hamilt2density * Fix: make files in consistent with upstream * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor: fix unit test * Refactor: fix unit test * Refactor: fix unit test * Refactor: fix unit test * 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 * Fix: Compile Error on CUDA > 12.9 * Fix: Compile Error on CUDA > 12.9 * Feature: Support linear combination of coulomb_param for EXX PW * Fix: Fix compile issue * 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 * Fix: Integrate test * Refactor * Refactor * Refactor * Refactor * Refactor * 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 --------- Co-authored-by: zhangzhihao <1900017707@pku.edu.cn> Co-authored-by: zhangzh-pku <64026312+zhangzh-pku@users.noreply.github.com> Co-authored-by: wqzhou <33364058+WHUweiqingzhou@users.noreply.github.com> Co-authored-by: kirk0830 <67682086+kirk0830@users.noreply.github.com> Co-authored-by: Haozhi Han <haozhi.han@outlook.com> Co-authored-by: Zhao Tianqi <hongriTianqi@users.noreply.github.com> Co-authored-by: PeizeLin <78645006+PeizeLin@users.noreply.github.com> Co-authored-by: jinzx10 <jzx016@hotmail.com> Co-authored-by: Chun Cai <amoycaic@gmail.com> Co-authored-by: Peng Xingliang <91927439+pxlxingliang@users.noreply.github.com> Co-authored-by: Jie Li <76780849+jieli-matrix@users.noreply.github.com> Co-authored-by: Wenfei Li <38569667+wenfei-li@users.noreply.github.com> Co-authored-by: Denghui Lu <denghuilu@pku.edu.cn> Co-authored-by: YI Zeping <18586016708@163.com> Co-authored-by: wenfei-li <liwenfei@gmail.com> Co-authored-by: jingan-181 <78459531+jingan-181@users.noreply.github.com> Co-authored-by: StarGrys <771582678@qq.com> Co-authored-by: Haozhi Han <haozhi.han@stu.pku.edu.cn> Co-authored-by: Mohan Chen <mohan.chen.chen.mohan@gmail.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: Taoni Bao <baotaoni@pku.edu.cn> Co-authored-by: Chen Nuo <49788094+Cstandardlib@users.noreply.github.com>
…(#6517) * change BFGS name and make lattice_change_cg and ions_move_cg shorter * change input parameters * change BFGS name and make lattice_change_cg and ions_move_cg shorter * change input parameters * change input parameters * change input parameters * change input parameters * change input parameters * fix INPUT problem * fix INPUT problem * fix INPUT problem * fix INPUT problem * fix INPUT problem * fix INPUT problem * fix INPUT problem * fix INPUT problem * fix INPUT problem --------- Co-authored-by: Fei Yang <2501213217@stu.pku.edu.cn>
* feat pexsi * fix : diag not completed * feat * feat: pexsi hsolver * CMake building implemented * Works * adapt to the new container * Turn off USE_PEXSI * Update LibRI to 553c91c * modify include files * namespace-ize * new inputs added * Configure Makefile Compiling, fix typos * Fix Makefile Intel toolchains compile errors * Fix even more PEXSI related Makefile compiling issues * Modify inputs and update to latest version (abacusmodeling#2) * run INPUT.Default() in every process in InputParaTest (#3490) Co-authored-by: kirk0830 <67682086+kirk0830@users.noreply.github.com> * add blas support for FindLAPACK.cmake (#3497) * more unittest of QO: towards orbital selection (#3499) * Fix: fix bug in mulliken charge calculation (#3503) * fix phase * fix case test * Refactor: namespace Conv_Coulomb_Pot_K (#3446) * Refactor: namespace Conv_Coulomb_Pot_K * Refactor: namespace Conv_Coulomb_Pot_K --------- Co-authored-by: wqzhou <33364058+WHUweiqingzhou@users.noreply.github.com> * enable the computation of all zeros in one function call (#3449) Co-authored-by: wqzhou <33364058+WHUweiqingzhou@users.noreply.github.com> * replace ios.eof() by ios.good() to avoid meeting badbit and failbit in reading STRU (#3506) * Build: add ccache to accelerate the testing process (#3509) * Build: add ccache to accelerate the testing process * Update test.yml * Update test.yml * Update test.yml * Docs: to avoid the misunderstanding in docs (#3518) * to avoid the misunderstanding in docs * Update docs/quick_start/hands_on.md Co-authored-by: Chun Cai <amoycaic@gmail.com> --------- Co-authored-by: Chun Cai <amoycaic@gmail.com> * Docs: fix a missing depencency in conda build env (#3508) * Feature: Add ENABLE_RAPIDJSON option to control the output of abacus.json (#3519) Add ENABLE_RAPIDJSON option to control the output of abacus.json * Feature: add python wrapper for math sphbes (#3475) * recommit for review * add python wrapper * remove timer since performace tests add * Feature: support segment split in kline mode in KPT file and `out_band` band output precision control, `8` as default (#3493) * add precision control * correct serial version of nscf_band function * fix issue 3482 * update unit and integrated test * update document * correct unittest and make compatible with false and true * fix: bug in Autotest.sh when result.ref has no totaltimeref (#3523) * Fix : unit test of module_xc (#3524) * Fix: omit small magnetic moments to avoid numerical instability (#3530) * update deltalambda * avoid numerical error in orbMulP * add constrain on Mi * change case reference value * Fix: fix multiple compiler warnings (#3515) * Fix: add noreturn attribute to warning_quit * Add type conversion * fix string literal * fix small number trunctuation * Fix system call returned value not checked * fix missing braket * Refactor parameter_pool.cpp and parameter_pool.h * remove duplicated return statements * Change WARNING_QUIT occurances in tests * Add warning message to help debug UT * output the default precision flag (#3496) Co-authored-by: kirk0830 <67682086+kirk0830@users.noreply.github.com> * Build: Improving CMake performance for finding LibXC and ELPA (#3478) * Fix for finding LibXC and ELPA * For compatibility to previous routines * syntax fix for FindELPA.cmake * Update cmake/FindELPA.cmake Co-authored-by: Chun Cai <amoycaic@gmail.com> * Using CMake interface as default for finding LibXC * update docs * fix for FindLibxc: changing imcompatible if statement * fix for FindLibxc: changing imcompatible if statement * fix for FindLibxc: changing imcompatible if statement * update docs for installing pkg-config * Update FindLibxc.cmake * Update FindLibxc.cmake * remove previous LibXC routine in CMakeLists.txt Co-authored-by: Chun Cai <amoycaic@gmail.com> * Update easy_install.md with Makefile-built LibXC supported * Update easy_install.md to include different behavior in different version on finding ELPA --------- Co-authored-by: Chun Cai <amoycaic@gmail.com> * Docs: correct some docs about mp2 smearing method (#3533) * correct some docs about mp2 smearing method * add docs about mv method * Feature : printing band density (#3501) Co-authored-by: wenfei-li <liwenfei@gmail.com> Co-authored-by: wqzhou <33364058+WHUweiqingzhou@users.noreply.github.com> * add some docs for PR#3501 (#3537) * Feature: enable restart charge density mixing during SCF (#3542) * add a new parameter mixing_restart * do not update rho if iter==mixing_restart * do not update rho if iter==mixing_restart-1 * reset mix and rho_mdata if iter==mixing_restart * fix SCF exit directly since drho=0 if iter=GlobalV::MIXING_RESTART * re-set_mixing in eachiterinit for PW and LCAO * enable SCF restarts in esolver_ks::RUN * add some UnitTests * add some Docs * new inputs added * Update input-main.md (#3551) Solve the format problem mentioned in issue 3543 * Build: fix compatibility issue against toolchain install (#3540) * Fix for finding LibXC and ELPA * For compatibility to previous routines * syntax fix for FindELPA.cmake * Update cmake/FindELPA.cmake Co-authored-by: Chun Cai <amoycaic@gmail.com> * Using CMake interface as default for finding LibXC * update docs * fix for FindLibxc: changing imcompatible if statement * fix for FindLibxc: changing imcompatible if statement * fix for FindLibxc: changing imcompatible if statement * update docs for installing pkg-config * Update FindLibxc.cmake * Update FindLibxc.cmake * remove previous LibXC routine in CMakeLists.txt Co-authored-by: Chun Cai <amoycaic@gmail.com> * Update easy_install.md with Makefile-built LibXC supported * Update easy_install.md to include different behavior in different version on finding ELPA * fix compatibility issue against toolchain * Change default ELPA install routine to old one --------- Co-authored-by: Chun Cai <amoycaic@gmail.com> * Test: Configure performance tests for math libraries (#3511) * add performace test of sphbes functions. * fix benchmark cmake errors * add dependencies for docker * update docs * add performance tests for sphbes * add google benchmark * rewrite benchmark tests in fixtures * disable internal testing in benchmark * merge benchmark into integration test --------- Co-authored-by: StarGrys <771582678@qq.com> * Configure Makefile Compiling, fix typos * Fix Makefile Intel toolchains compile errors * Fix even more PEXSI related Makefile compiling issues * Update hsolver_pw.cpp (#3556) when use_uspp==false, overlap matrix should be E. * Fix: cuda build target (#3276) * Fix: cuda buid target * Update CMakeLists.txt --------- Co-authored-by: Denghui Lu <denghuilu@pku.edu.cn> --------- Co-authored-by: wqzhou <33364058+WHUweiqingzhou@users.noreply.github.com> Co-authored-by: kirk0830 <67682086+kirk0830@users.noreply.github.com> Co-authored-by: Haozhi Han <haozhi.han@outlook.com> Co-authored-by: Zhao Tianqi <hongriTianqi@users.noreply.github.com> Co-authored-by: PeizeLin <78645006+PeizeLin@users.noreply.github.com> Co-authored-by: jinzx10 <jzx016@hotmail.com> Co-authored-by: Chun Cai <amoycaic@gmail.com> Co-authored-by: Peng Xingliang <91927439+pxlxingliang@users.noreply.github.com> Co-authored-by: Jie Li <76780849+jieli-matrix@users.noreply.github.com> Co-authored-by: Wenfei Li <38569667+wenfei-li@users.noreply.github.com> Co-authored-by: Denghui Lu <denghuilu@pku.edu.cn> Co-authored-by: YI Zeping <18586016708@163.com> Co-authored-by: wenfei-li <liwenfei@gmail.com> Co-authored-by: jingan-181 <78459531+jingan-181@users.noreply.github.com> Co-authored-by: StarGrys <771582678@qq.com> Co-authored-by: Haozhi Han <haozhi.han@stu.pku.edu.cn> * Revert "Modify inputs and update to latest version" * Update FindPEXSI.cmake to fix Comments * Fix CI errors * Fix CI Errors and Merge with Upstream * Resolve Pull Request Reviews * Fix parallel communication related issue * Fix vars in Makefile.vars, add input tests and comments for pexsi vars * Fix nspin > 1 cases * Improvement: take calculated mu as new initial guess, may slightly improve performance * Fix mistakes in the last commit * Fix: params and features - set default pexsi_temp - fix md in pexsi * fix empty lines * Fix: move params to pexsi_solver, rename USE_PEXSI to ENABLE_PEXSI * Docs: added docs for pexsi inputs * Fix unit test issues in input_conv * 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 * Fix Compile errors * refactor to abandon `pdiagh` * Fix mu_buffer and nspin * Updates with latest * Refactor: in ESolver_KS_PW, calculate deband in iter_finish, not in hamilt2density * Fix: make files in consistent with upstream * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor: fix unit test * Refactor: fix unit test * Refactor: fix unit test * Refactor: fix unit test * 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 * Fix: Compile Error on CUDA > 12.9 * Fix: Compile Error on CUDA > 12.9 * Feature: Support linear combination of coulomb_param for EXX PW * Fix: Fix compile issue * 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 * Fix: Integrate test * Refactor * Refactor * Refactor * Refactor * Refactor * 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 * Fix GPU, but so ugly... * Fix GPU, but so ugly... --------- Co-authored-by: zhangzhihao <1900017707@pku.edu.cn> Co-authored-by: zhangzh-pku <64026312+zhangzh-pku@users.noreply.github.com> Co-authored-by: wqzhou <33364058+WHUweiqingzhou@users.noreply.github.com> Co-authored-by: kirk0830 <67682086+kirk0830@users.noreply.github.com> Co-authored-by: Haozhi Han <haozhi.han@outlook.com> Co-authored-by: Zhao Tianqi <hongriTianqi@users.noreply.github.com> Co-authored-by: PeizeLin <78645006+PeizeLin@users.noreply.github.com> Co-authored-by: jinzx10 <jzx016@hotmail.com> Co-authored-by: Chun Cai <amoycaic@gmail.com> Co-authored-by: Peng Xingliang <91927439+pxlxingliang@users.noreply.github.com> Co-authored-by: Jie Li <76780849+jieli-matrix@users.noreply.github.com> Co-authored-by: Wenfei Li <38569667+wenfei-li@users.noreply.github.com> Co-authored-by: Denghui Lu <denghuilu@pku.edu.cn> Co-authored-by: YI Zeping <18586016708@163.com> Co-authored-by: wenfei-li <liwenfei@gmail.com> Co-authored-by: jingan-181 <78459531+jingan-181@users.noreply.github.com> Co-authored-by: StarGrys <771582678@qq.com> Co-authored-by: Haozhi Han <haozhi.han@stu.pku.edu.cn> Co-authored-by: Mohan Chen <mohan.chen.chen.mohan@gmail.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: Taoni Bao <baotaoni@pku.edu.cn> Co-authored-by: Chen Nuo <49788094+Cstandardlib@users.noreply.github.com>
* update small places in charge_mixing_residual.cpp * update charge_mixing_preconditioner * add timers and remove some PARAM.inp.nspin * fix problems * add timers * small fix * fix a potential memory leak * fix bug * add ctrl_output_pw files but cannot run now * add some interfaces in ctrl_output_pw * keep fixing bugs * successfully compile the codes * finally I understand Devicegit add ../source/source_base/module_device/device.h ../source/source_io/ctrl_output_pw.cpp ../source/source_io/ctrl_output_pw.h! * update function variables * one step further * move on * update codes, done! * fix bug * add setup_pot * fix bugs * update esolver_ks_pw, add setup_pot * update format of esolver_ks_pw.cpp * update setup_pot for GPU version * update esolver_ks_pw.cpp * add setup_estate_pw in source_estate * fix some bugs * small update * move teardown to deconstructor of ESolver * fix error in passing pointers * move teardown function to the correct place * fix bugs * update * add two functions in module_pwdft * add setup_pwrho file, and update esolver_fp * update esolver_fp * add teardown function in setup_pwrho * update esolver * move the after_all_runners() function of the base class to the end * add TITLE for after_all_runners * update esolver_fp, move teardown to desconstructor * Revert "update esolver_fp, move teardown to desconstructor" This reverts commit 8516477. * Revert "add TITLE for after_all_runners" This reverts commit 16ba5d2. * Revert "move the after_all_runners() function of the base class to the end" This reverts commit d672bca.
…_Orb` (#6561) * Feature: add ABFS_ORBITAL and ABFS_JLES_ORBITAL in Exx_Opt_Orb * Fix: delete exx_opt_orb_lmax=-1 unittest --------- Co-authored-by: linpz <linpz@mail.ustc.edu.cn>
* update small places in charge_mixing_residual.cpp * update charge_mixing_preconditioner * add timers and remove some PARAM.inp.nspin * fix problems * add timers * small fix * fix a potential memory leak * fix bug * add ctrl_output_pw files but cannot run now * add some interfaces in ctrl_output_pw * keep fixing bugs * successfully compile the codes * finally I understand Devicegit add ../source/source_base/module_device/device.h ../source/source_io/ctrl_output_pw.cpp ../source/source_io/ctrl_output_pw.h! * update function variables * one step further * move on * update codes, done! * fix bug * add setup_pot * fix bugs * update esolver_ks_pw, add setup_pot * update format of esolver_ks_pw.cpp * update setup_pot for GPU version * update esolver_ks_pw.cpp * add setup_estate_pw in source_estate * fix some bugs * small update * move teardown to deconstructor of ESolver * fix error in passing pointers * move teardown function to the correct place * fix bugs * update * add two functions in module_pwdft * add setup_pwrho file, and update esolver_fp * update esolver_fp * add teardown function in setup_pwrho * update esolver * move the after_all_runners() function of the base class to the end * add TITLE for after_all_runners * update esolver_fp, move teardown to desconstructor * Revert "update esolver_fp, move teardown to desconstructor" This reverts commit 8516477. * Revert "add TITLE for after_all_runners" This reverts commit 16ba5d2. * Revert "move the after_all_runners() function of the base class to the end" This reverts commit d672bca. * update esolver, move chargemixing to module_charge * update dm pointer in esolver_ks_lcao * reduce the charge mixing code in esolver_ks_lcao * reduce the lines of esolver_ks_lcao * update dm vector * change ctrl_output_lcao to ctrl_scf_lcao * add ctrl_runner_lcao, but cannot run * add ctrl_runner_lcao successfully * add ctrl_iter_lcao files * restore esolver_ks_lcao iter_finish * fix bugs * update ctrl_iter_lcao * upate, compile successfully * fix bug * fix bug, add GlobalC using global.h * fix deepks compile * update estate
* 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
* CI: create soft link after build * add a line to echo "soft link created: abacus-gpu -> build/abacus_2g" * create soft link in cmakelist
* 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! * small updates of mulliken file format * update mulliken charge output nspin=1 * Fix: Create symbolic link 'abacus' for test compatibility * update mulliken output * update mulliken spin 2 * update mulliken 4 * mulliken for spin 1 * update mulliken and refs * update mulliken test to match new output format * update pchg * update mulliken test --------- Co-authored-by: abacus_fixer <mohanchen@pku.eud.cn>
… several related output formats (#6973) * 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! * small updates of mulliken file format * update mulliken charge output nspin=1 * Fix: Create symbolic link 'abacus' for test compatibility * update mulliken output * update mulliken spin 2 * update mulliken 4 * mulliken for spin 1 * update mulliken and refs * update mulliken test to match new output format * update pchg * update mulliken test * update directories in 02_NAO_Gamma * change the directories in 02_NAO_Gamma to make it more clear * exclude a test * Update INPUT files: replace tabs with spaces and align columns * update write_dmk.cpp * update out_dmr_dmk example in 03 * fix write_dmk_test.cpp * fix bug * update write_dmk.cpp * update write_dmk * update * update dmr output format, and change all the output of sparsematrix format * update dmrs1_nap.csr.ref * fix reader of dmr matrix * fix bug, now it works! * update format * add spin information in dmr * update example in 03: scf_in_dmr_GaAs * add reference data * update example in 03: scf_in_dmr_Si * add example: scf_in_dmr_Si_spin2_hasbug * update example 03: scf_out_dmr_dmk_pot * change pot from int to vector! * fix bug about out_pot * update potential, now it works with 2 parameters * fix bug, out_chg 2 now supports precision control of chginit.cube file! * fix tests * fix example * fix example reference data * update tab of write_HS.hpp * replace tab with blank in write_HS_R.cpp * fix elf test * delete 40_NO_ELF test * update nscf_out_pot test * update pot in nscf_out_pot * update md_out_syns test * update meta-gga output charge density and kinetic energy density * update test chg tau in metagga * update examples * fix tests! * update 03 CASES_CPU.txt * fix 03 scf_in_dmr_GaAs test * update 02 CASES_CPU.txt * fix 054 test in 01 * fix another test scf_out_elf in 01 * fix ldos test * fix test in scf_out_chg_tau * fix two tests in OFDFT * update deepks examples * fix the unittest of csr_reader.cpp * fix sparse_matrix.cpp unit tests * fix read_input_item_test.cpp * fix dmk * comment out read_dmk * fix rho_io test * fix bug * update unitcell, about changing none to user_defined_lattice * fix scf_in_dmr_GaAs * temporaly remove csr reader test in Hcontainer, will add back later --------- Co-authored-by: abacus_fixer <mohanchen@pku.eud.cn>
* 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 interfaces directory in ABACUS * add Candela README --------- Co-authored-by: abacus_fixer <mohanchen@pku.eud.cn>
* Do not do unit tests on big input to reduce time consumption * Do not do unit tests on big input Si64 to reduce time consumption * Fix typo * Further reduce random test size
* 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 * reformat of INPUT, replace tab with blank * rename 44 and 45 directories * rename 4 * rename 54 55 56 * rename 36 and 37 * update examples 32 33 and 60 * fix bug * update a few examples * update examples * msst * update examples * update example * update * update * update a few examples * update * update pp * finish 63 examples in 03_NAO_multik * Format INPUT files in 03_NAO_multik: replace tabs with spaces and align parameters * Format INPUT files in 02_NAO_Gamma: replace tabs with spaces and align parameters * Format INPUT files in 01_PW: replace tabs with spaces and align parameters * Format all INPUT files in tests: replace tabs with spaces and align parameters * update exe of abacus --------- Co-authored-by: abacus_fixer <mohanchen@pku.eud.cn>
* Feature: abacus light-weight ase plugin * preparing the examples of MD and MTD * feat: 添加ABACUS v3.9.0.x版本支持并完善测试 fix(io): 移除legacyio.py中已弃用的read_istate函数 test: 添加xtest.sh测试脚本和测试文件 ci: 配置GitHub Actions工作流实现自动化测试 docs: 更新示例脚本包括DOS计算、约束MD、MTD和常规MD refactor(core): 清理未完成的restart测试代码 style: 统一文件格式和代码风格 * test: 注释掉测试中删除eig_occ.txt的代码 * test(abacuslite): 添加从running_log读取电子求解器类型和能带的测试 添加测试用例验证从running_log文件中正确读取电子求解器类型和能带信息。同时包含对轨迹、力和应力读取功能的测试。 * test: 更新测试用例以使用新的MD_dump示例文件 修改测试文件路径和预期值以匹配新的测试数据文件nspin4-gamma-mddump,该文件包含2帧数据而非原来的11帧,且alat_in_angstrom值不同 * test(abacuslite): 修复测试方法命名并添加缺失的测试断言 修复测试方法命名错误,将read_*改为test_read_*以正确执行测试 添加对轨迹、力和应力读取功能的详细测试断言 更新应力测试以匹配实际单位转换逻辑 * test(abacuslite): 为TestLatestIO添加原子和k点类型检查 添加对读取结果中原子和k点类型的断言检查,确保返回的Atoms对象及其计算器属性类型正确 * fix(io): 修正测试脚本和IO模块中的问题 - 在xtest.sh中添加set -e以确保错误时退出 - 修复generalio.py中的类型提示和路径处理 - 更新legacyio.py以支持非共线磁矩读取 - 添加新的测试文件并更新测试用例 - 修正KPT文件读写逻辑 * feat(tests): 添加新的测试脚本和更新现有测试 refactor(core): 重构核心测试用例,使用临时目录并简化测试逻辑 feat(ksampling): 添加k路径生成功能,集成seekpath库 docs(examples): 更新带结构示例,引用seekpath并简化代码 * Fix the workflow configuration * ci(workflow): configure, build and install ABACUS * ci(workflow): change the image name * ci(workflow): create soft link from abacus_2p to abacus * update or delete the reference values * fix the integration test case of band * recover the calculation of scf integration test * add indent for the check on bandstructure.json file * Explicitly restrict the possible type of esolver_type to ksdft * fix the inconsistency of atom order between ase and abacus * remove the neb example temporarily * recover the neb.py example * Move files to the interfaces/ASE_interface directory --------- Co-authored-by: Mohan Chen <mohanchen@pku.edu.cn>
… (#6935) * feat: add built-in help system with fuzzy search for INPUT parameters - Add -h/--help flag for parameter documentation - Add -s/--search flag for keyword search - Implement fuzzy matching for typo suggestions (Levenshtein distance) - Case-insensitive parameter lookup - Auto-generate help data from markdown at build time - 458 parameters documented with comprehensive metadata Usage: abacus -h <param>, abacus -s <keyword> refactor(help): improve help system with critical fixes and performance optimizations docs(help): integrate help system documentation into quick start guide Add concise help system section to docs/quick_start/input.md covering: - Basic commands (-h, -s flags) - Example output for parameter lookup - Fuzzy matching for typo suggestions - Case-insensitive lookup behavior Remove standalone documentation files that are now redundant: - docs/HELP_SYSTEM.md - docs/FUZZY_SEARCH.md * fix(test): fix help system unit tests - Add input_help.cpp to MODULE_IO_parse_args test sources to fix linker error - Fix input_help_test.cpp include path and use value syntax instead of pointer - Fix parse_args_test.cpp death tests to use EXPECT_EXIT regex matching instead of CaptureStderr which doesn't work properly with fork() * refactor(help): address PR review feedback and improve fuzzy matching This commit addresses all code review comments and fixes a critical UX issue in the help system's fuzzy matching algorithm. ## Documentation Fixes - Fix incorrect "case-sensitive" documentation (should be "case-insensitive") - Update API documentation for find_similar_parameters() with new algorithm details - Add inline comments explaining 3-tier matching strategy ## Architecture Improvements - Add std::ostream& parameter to show_general_help() and show_parameter_help() - Enable flexible stream redirection (stdout for success, stderr for errors) - Maintain backward compatibility with default parameters - Eliminate code duplication by reusing show_general_help() in error handler ## UX Fix: Fuzzy Matching Algorithm ### Problem Pure Levenshtein distance suggested semantically irrelevant parameters: - "abacus -h relax" incorrectly suggested "dmax" and "nelec" ### Solution Implement 3-tier semantic matching strategy: 1. Prefix matches (e.g., "relax" → "relax_new") - Priority 0 2. Substring matches (e.g., "cut" → "ecutwfc") - Priority 1 3. Levenshtein distance for typos - Priority 10+ * feat(docs): auto-generate INPUT docs from C++ source with built-in help system Migrate INPUT parameter documentation from a manually-maintained markdown file to auto-generation from C++ source. Documentation fields (category, type, description, default_value, unit, availability) are now embedded directly in Input_Item registrations in read_input_item_*.cpp files, serving as the single source of truth for both the built-in --help system and the Sphinx documentation. Key changes: - Add docs/generate_docs_from_source.py to parse C++ source and generate input-main.md (492 parameters across 34 categories) - Hook generator into Sphinx build via builder-inited event in conf.py - Add [NOTE] documentation to 36 parameters preserving notes from the previous manually-maintained docs (version compat, usage caveats) - Fix generator regex to handle comments before Input_Item declarations - Rename tmp_item to item in smearing_sigma_temp block for generator compatibility - Remove old tools/generate_help_data.py and input_help_data.h pipeline * feat(docs): replace regex-based doc generation with YAML pipeline The old generate_docs_from_source.py parsed C++ source files with regex to extract Input_Item metadata, which was fragile and broke on code refactoring. Replace it with a pipeline that uses the binary's own parameter registry: abacus --generate-parameters-yaml > docs/parameters.yaml python docs/generate_input_main.py docs/parameters.yaml - Add ParameterHelp::generate_yaml() with YAML serialization helpers - Add --generate-parameters-yaml CLI flag to parse_args.cpp - Add POST_BUILD command in CMakeLists.txt to auto-regenerate docs/parameters.yaml on every build - Create docs/generate_input_main.py (YAML-to-markdown converter) - Update docs/conf.py Sphinx hook to use YAML pipeline - Track docs/parameters.yaml in the repository - Delete docs/generate_docs_from_source.py - Add 5 unit tests for YAML generation * fix(docs): quote numeric YAML values, remove auto-generation, update contributing guide - Quote numeric-looking default values in yaml_quote_if_needed() so PyYAML parses them as strings (fixes 92 parameters losing defaults) - Also quote .inf, -.inf, .nan YAML special values - Fix Python generate_input_main.py to use != '' instead of truthiness checks, preventing falsy-but-valid values (e.g. 0) from being dropped - Replace sys.exit(1) with FileNotFoundError in generate() for safe use as a library from conf.py - Remove POST_BUILD command from CMakeLists.txt (not portable across CMake generators, breaks cross-compilation) - Update CONTRIBUTING.md "Documenting INPUT Parameters" section to describe the YAML-based workflow and remind developers to regenerate docs/parameters.yaml when adding or modifying parameters - Regenerate docs/parameters.yaml with all values properly quoted * fix(docs): reorder add_item() calls in read_input_item_*.cpp to match legacy doc order The built-in help system generates input-main.md from C++ source, with parameter order determined by add_item() call order. After introducing the YAML-based doc pipeline, 19 of 32 documentation sections had different parameter ordering compared to the old hand-maintained input-main.md. Reorder item blocks within each of the 13 read_input_item_*.cpp files to restore the original documentation order. This is a pure mechanical reordering with no logic changes. 28 of 32 sections now match; the 4 remaining differences are due to cross-file constraints (constructor call order) that cannot be resolved without moving items between files. Add a comment to each item_*() function noting that add_item() call order determines generated documentation order. * Add pyyaml as requirements for documentation generation * Commit updated input-main.md and parameters.yaml * Commit the changes to the parameters.yaml * fix(input): restore develop-parity token count handling for read_input output items
* Docs: update the documentation of abacuslite * update the online documentation
* Fix formatting issue for input-main and update type info - Update the type field of parameter item field where multiple values are expected. - Fixed formatting issue in input-main.md where > and < are not escaped correctly. * Fix more formating issues Fixed some LaTeX issue and unify the description of types. * Add automatic escaping for < and > Escaping is performed when the md file is generated. * Minor wording updates
* fix: nspin = 2 for init_chg=dm * Fix: findmkl.cmake error * Fix: init_chg hr support nspin=2 * Fix: refactor for short esolver_ks_lcao.cpp * Fix: rewrite init_dm_from_file_test to match new CSR format, add init_chg=hr tests The CSR file format was updated (commit 9c1a061) with spin info, ucell data, and CSR comment block headers, but the unit test still wrote the old format, causing parse failures. Rewrote write_test_csr to use write_dmr_csr so the test always produces the current format. Added HR read tests for nspin=1 and nspin=2 covering the init_chg=hr code path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix: replace system() calls with POSIX mkdir in init_dm_from_file test Use POSIX mkdir() from <sys/stat.h> instead of system("mkdir -p") for C++11 compatibility, and remove system("rm -rf") cleanup calls. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: dyzheng <zhengdy@bjaisi.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Update test for MODULE_HAMILT and MODULE_ESTATE * Update tests for MODULE_LCAO and MODULE_PW * Complete All * Update github workflow * Fix MODULE_LR
There was a problem hiding this comment.
Pull request overview
This PR introduces substantial Python/C++ binding expansions (PyABACUS ESolver + Driver scaffolding), refactors several pybind11 array-handling call sites via shared utilities, and updates CI/docs/examples across the repository—well beyond the stated “utils.cpp file open check” scope.
Changes:
- Add new PyABACUS
esolver+driverPython packages, data containers, and build integration. - Refactor multiple pybind11 bindings to use shared numpy validation/copy helpers and adjust some binding APIs.
- Update CI workflows, CMake find modules, docs, and add an ASE plugin + tests/examples.
Reviewed changes
Copilot reviewed 142 out of 3392 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| python/pyabacus/src/pyabacus/esolver/data_types.py | Add Python dataclasses for ESolver result/state containers |
| python/pyabacus/src/pyabacus/esolver/init.py | Export ESolver workflow/types and try-import C++ bindings |
| python/pyabacus/src/pyabacus/driver/init.py | Add Python driver facade and optional C++ binding import |
| python/pyabacus/src/pyabacus/init.py | Expose esolver/driver and convenience abacus() via lazy imports |
| python/pyabacus/src/pyabacus/ModuleNAO/_module_nao.py | Change lmax/rcut_max Python API shape via overload wrapper |
| python/pyabacus/src/py_numerical_radial.cpp | Use shared pybind utils for array checks/pointer access and return copies |
| python/pyabacus/src/hsolver/py_hsolver.cpp | Switch HSolver pybind bindings to adapter-based implementation; guard CG binding |
| python/pyabacus/src/hsolver/py_diago_dav_subspace.hpp | Adjust Davidson-subspace call signature (remove need_subspace argument) |
| python/pyabacus/src/hsolver/py_diago_cg.hpp | Update CG subspace callback signature |
| python/pyabacus/src/hsolver/CMakeLists.txt | Swap kernel source and add device helper source |
| python/pyabacus/src/ModuleNAO/py_m_nao.cpp | Use shared pybind utils; change lmax/rcut_max from properties to methods |
| python/pyabacus/src/ModuleNAO/CMakeLists.txt | Link device helper source |
| python/pyabacus/src/ModuleESolver/interfaces/i_scf_controller.hpp | Add SCF controller abstraction interface |
| python/pyabacus/src/ModuleESolver/interfaces/i_hamiltonian_builder.hpp | Add Hamiltonian builder interface and typed aliases |
| python/pyabacus/src/ModuleESolver/interfaces/i_diagonalizer.hpp | Add diagonalizer interface + config/result types |
| python/pyabacus/src/ModuleESolver/interfaces/i_charge_mixer.hpp | Add charge mixer interface + config and enum conversions |
| python/pyabacus/src/ModuleESolver/components/scf_controller_lcao.hpp | Add placeholder LCAO SCF controller implementation |
| python/pyabacus/src/ModuleESolver/CMakeLists.txt | Add _esolver_pack pybind target (header-only placeholder linking) |
| python/pyabacus/src/ModuleDriver/py_driver.hpp | Add C++ driver API skeleton + CalculationResult container |
| python/pyabacus/src/ModuleDriver/CMakeLists.txt | Disable driver build (subprocess fallback) |
| python/pyabacus/src/ModuleBase/CMakeLists.txt | Link device helper source |
| python/pyabacus/pyproject.toml | Raise Python/pybind11 minimum versions |
| python/pyabacus/examples/lcao_workflow_example.py | Add ESolver workflow usage examples |
| python/pyabacus/CONTRIBUTING.md | Update example CMake snippet to new kernel filename |
| python/pyabacus/CMakeLists.txt | Add ModuleESolver and optional ModuleDriver build option |
| interfaces/README | Add top-level interfaces README |
| interfaces/PYATB_interface/README | Add placeholder interface README |
| interfaces/HefeiNAMD_interface/README | Add placeholder interface README |
| interfaces/Candela_interface/README | Add placeholder interface README |
| interfaces/ASE_interface/tests/xtest.sh | Add ASE interface test runner script |
| interfaces/ASE_interface/tests/scf.py | Add ASE SCF integration test |
| interfaces/ASE_interface/tests/relax.py | Add ASE relax integration test |
| interfaces/ASE_interface/tests/md.py | Add ASE MD integration test |
| interfaces/ASE_interface/tests/band.py | Add ASE SCF+NSCF/band integration test |
| interfaces/ASE_interface/pyproject.toml | Add abacuslite packaging metadata |
| interfaces/ASE_interface/examples/scf.py | Add ASE SCF example |
| interfaces/ASE_interface/examples/relax.py | Add ASE relax example |
| interfaces/ASE_interface/examples/neb.py | Add ASE NEB example |
| interfaces/ASE_interface/examples/metadynamics.py | Add ASE metadynamics example |
| interfaces/ASE_interface/examples/md.py | Add ASE MD example |
| interfaces/ASE_interface/examples/dos.py | Add ASE DOS example |
| interfaces/ASE_interface/examples/constraintmd.py | Add ASE constrained MD example |
| interfaces/ASE_interface/examples/cellrelax.py | Add ASE cell-relax example |
| interfaces/ASE_interface/examples/bandstructure.py | Add ASE bandstructure example |
| interfaces/ASE_interface/abacuslite/xtest.sh | Add unit-test runner for abacuslite package |
| interfaces/ASE_interface/abacuslite/io/testfiles/nspin4-gamma-mddump | Add IO parsing fixture |
| interfaces/ASE_interface/abacuslite/io/testfiles/nspin4-gamma-eigocc | Add IO parsing fixture |
| interfaces/ASE_interface/abacuslite/io/testfiles/lcao-symm1-nspin1-multik-scf | Add IO parsing fixture |
| interfaces/ASE_interface/abacuslite/io/testfiles/input-script | Add IO parsing fixture |
| interfaces/ASE_interface/abacuslite/init.py | Add package init for abacuslite |
| interfaces/ASE_interface/README.md | Add ASE interface documentation |
| interfaces/ASE_interface/DEVELOP.md | Add developer guide for abacuslite internals |
| examples/relax/pw_output/KPT | Add trailing newline |
| examples/relax/pw_output/INPUT | Update example parameters/output controls |
| examples/relax/lcao_output/INPUT | Update example parameters/output controls |
| examples/36_gpu/si16_pw/INPUT | Update mixing_beta example |
| examples/36_gpu/si16_lcao/KPT | Update k-mesh and guidance comments |
| examples/36_gpu/si16_lcao/INPUT | Update GPU example parameters/comments |
| examples/19_dftu/NiO/INPUT | Remove out_bandgap setting |
| examples/04_noncollinear/BCC_Fe_NC_ground_state/reference/scf.output.ref | Update operator names in reference output |
| examples/03_spin_polarized/FM/reference/scf.output.ref | Update operator names in reference output |
| examples/03_spin_polarized/FM/reference/running_scf.log.ref | Update operator names in reference output |
| examples/03_spin_polarized/ATOM/reference/scf.output.ref | Update operator names in reference output |
| examples/03_spin_polarized/ATOM/reference/running_scf.log.ref | Update operator names in reference output |
| examples/03_spin_polarized/ATOM/INPUT | Remove out_bandgap setting |
| examples/03_spin_polarized/AFM/reference/scf.output.ref | Update operator names in reference output |
| examples/03_spin_polarized/AFM/reference/running_scf.log.ref | Update operator names in reference output |
| doxygen/Doxyfile | Set DOT_NUM_THREADS to 2 |
| docs/requirements.txt | Add pyyaml dependency |
| docs/quick_start/input.md | Expand parameter-help docs and STRU note |
| docs/conf.py | Add theme TOC options + auto-generate input docs from YAML |
| docs/community/faq.md | Expand community contact + SOC FAQ answer |
| docs/advanced/scf/spin.md | Restructure noncolin/lspinorb explanation; add SOC details |
| docs/advanced/scf/initialization.md | Document init_chg dm/hr modes |
| docs/advanced/pp_orb.md | Add SOC pseudopotential guidance |
| docs/advanced/output_files/running_scf.log.md | Update operator names in docs example |
| docs/advanced/opt.md | Document relax_new implementations and algorithm availability |
| docs/advanced/md.md | Add NEP section |
| docs/advanced/interface/index.rst | Add pyabacus to interface index |
| docs/advanced/interface/ase.md | Replace legacy ASE interface docs with abacuslite guide |
| docs/advanced/interface/TB2J.md | Remove out_bandgap setting |
| docs/advanced/install.md | Add NEP build instructions |
| docs/advanced/input_files/stru.md | Add extra PP link + clarify velocity usage + add lambda/sc notes |
| docs/advanced/input_files/kpt.md | Add k-point weights + symmetry notes |
| docs/advanced/elec_properties/position_matrix.md | Replace out_interval with out_freq_ion |
| docs/advanced/elec_properties/hs_matrix.md | Replace out_interval with out_freq_ion |
| docs/advanced/elec_properties/density_matrix.md | Document DM(R) CSR output and restart usage |
| docs/advanced/elec_properties/Mulliken.md | Replace out_interval with out_freq_ion |
| docs/advanced/acceleration/cuda.md | Clarify single vs multi-GPU usage; update arch guidance |
| docs/CONTRIBUTING.md | Document YAML-driven INPUT parameter docs workflow |
| docs/CITATIONS.md | Fix author spelling in citation |
| cmake/Testing.cmake | Add/modify testing infra with FetchContent fallbacks |
| cmake/SetupCuSolverMp.cmake | Add cuSolverMp dependency setup with version-based backend selection |
| cmake/FindNEP.cmake | Add NEP (CPU) find module |
| cmake/FindMKL.cmake | Adjust MKL discovery/targets and add iomp5 target |
| cmake/FindLibRI.cmake | Update LibRI download URL |
| cmake/FindFFTW3.cmake | Extract FFTW version string from header |
| cmake/FindCereal.cmake | Change cereal FetchContent URL to a fork |
| cmake/BuildInfo.cmake | Add build-info header generation helper |
| Dockerfile.gnu | Remove duplicate bc install |
| Dockerfile.cuda | Remove duplicate bc install |
| .github/workflows/version_check.yml | Update checkout action version and tag/code version matching logic |
| .github/workflows/test.yml | Update checkout action version; change test invocation to direct ctest |
| .github/workflows/pytest.yml | Update checkout/setup-python action versions |
| .github/workflows/performance.yml | Update checkout action version |
| .github/workflows/dynamic.yml | Update checkout action version |
| .github/workflows/doxygen.yml | Update checkout/upload artifact action versions |
| .github/workflows/devcontainer.yml | Add workspace cleanup steps; update checkout action version |
| .github/workflows/cuda.yml | Update checkout action version; ensure clean build dir |
| .github/workflows/coverage.yml | Update checkout action version; revamp coverage tool install and collection |
| .github/workflows/build_test_makefile.yml | Update checkout action version; adjust make invocation |
| .github/workflows/build_test_cmake.yml | Fix build args typos; update checkout action version; set PEXSI env |
| .github/workflows/ase_plugin_test.yml | Add CI workflow to build ABACUS and run abacuslite tests |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| """ | ||
| Data types for PyABACUS ESolver module. | ||
|
|
||
| This module defines dataclasses for storing calculation results | ||
| in a structured and type-safe manner. | ||
| """ |
There was a problem hiding this comment.
The PR title/description indicate a small fix (“Fix file open check in utils.cpp”), but the diff introduces large new modules (PyABACUS ESolver/Driver, ASE interface, CI/CMake/docs changes). Please update the PR title/description (and linked issue) to match the actual scope, or split into smaller PRs (e.g., bindings, docs, CI) to keep reviewability and traceability.
| @overload | ||
| def lmax(self) -> int: ... | ||
| @overload | ||
| def lmax(self, itype: int) -> int: ... | ||
|
|
||
| @property | ||
| def rcut_max(self) -> float: | ||
| return super().rcut_max | ||
| def lmax(self, *args, **kwargs): | ||
| return super().lmax(*args, **kwargs) | ||
|
|
||
| @overload | ||
| def rcut_max(self) -> float: ... | ||
| @overload | ||
| def rcut_max(self, itype: int) -> float: ... | ||
|
|
||
| def rcut_max(self, *args, **kwargs): | ||
| return super().rcut_max(*args, **kwargs) |
There was a problem hiding this comment.
This changes lmax/rcut_max from property-style access (no-arg) to a callable method, which is a breaking API change for downstream Python code that previously did obj.lmax (int) rather than obj.lmax(). Consider keeping backward compatibility by preserving the property names and introducing new methods for the indexed forms (e.g., lmax_of_type(itype) / rcut_max_of_type(itype)), or provide distinct attribute names for no-arg vs indexed access.
| .def("symbol", &RadialCollection::symbol, "itype"_a) | ||
| .def_property_readonly("ntype", &RadialCollection::ntype) | ||
| .def("lmax", overload_cast_<const int>()(&RadialCollection::lmax, py::const_), "itype"_a) | ||
| .def_property_readonly("lmax", overload_cast_<>()(&RadialCollection::lmax, py::const_)) | ||
| .def("lmax", overload_cast_<>()(&RadialCollection::lmax, py::const_)) | ||
| .def("rcut_max", overload_cast_<const int>()(&RadialCollection::rcut_max, py::const_), "itype"_a) | ||
| .def_property_readonly("rcut_max", overload_cast_<>()(&RadialCollection::rcut_max, py::const_)) | ||
| .def("rcut_max", overload_cast_<>()(&RadialCollection::rcut_max, py::const_)) |
There was a problem hiding this comment.
The bindings remove def_property_readonly(\"lmax\"/\"rcut_max\") and replace them with overloadable methods, which breaks existing Python usage expecting collection.lmax as an attribute. If compatibility matters, bind lmax/rcut_max properties under their original names and expose the indexed versions under new method names (or vice versa), rather than changing the existing meaning of the attribute.
| if (!initialized_) | ||
| { | ||
| throw std::runtime_error("SCF not initialized. Call initialize() first."); | ||
| } |
There was a problem hiding this comment.
std::runtime_error is used in this header but <stdexcept> is not included anywhere in this file (and the included headers shown don’t guarantee it). This can cause compilation errors depending on include order. Add #include <stdexcept> in this header.
| #include <pybind11/numpy.h> | ||
|
|
||
| #include <complex> | ||
| #include <functional> |
There was a problem hiding this comment.
This header uses std::pair but does not include <utility> (or another header that guarantees std::pair is declared). This can fail to compile in some environments. Add #include <utility>.
| #include <functional> | |
| #include <functional> | |
| #include <utility> |
| FetchContent_Declare( | ||
| googletest | ||
| GIT_REPOSITORY https://github.com/google/googletest.git | ||
| GIT_TAG "origin/main" | ||
| GIT_SHALLOW TRUE | ||
| GIT_PROGRESS TRUE) |
There was a problem hiding this comment.
Using GIT_TAG \"origin/main\" makes builds non-reproducible and can break unexpectedly as upstream changes. Pin FetchContent dependencies to a specific release tag or commit SHA (mandatory for deterministic CI and safer supply-chain behavior).
| FetchContent_Declare( | ||
| cereal | ||
| URL https://codeload.github.com/USCiLab/cereal/tar.gz/master | ||
| URL https://codeload.github.com/MCresearch/cereal/tar.gz/master |
There was a problem hiding this comment.
This switches the cereal source to a fork (MCresearch/cereal) and tracks master, which is both a supply-chain risk and non-reproducible. Prefer the official upstream repository (USCiLab/cereal) and pin to a specific tagged release or commit SHA. If the fork is required, document why and pin a specific commit.
| URL https://codeload.github.com/MCresearch/cereal/tar.gz/master | |
| # Use official upstream cereal and pin to a specific release for reproducibility. | |
| URL https://codeload.github.com/USCiLab/cereal/tar.gz/v1.3.2 |
| silicon.calc = abacus | ||
| e = silicon.get_potential_energy() | ||
| opt = BFGS(silicon) | ||
| opt.run(fmax=0.05, steps=1) | ||
| self.assertLessEqual(silicon.get_potential_energy(), e) | ||
| self.assertIsNotNone(silicon.calc.results['forces']) | ||
| self.assertIsNotNone(silicon.calc.results['stress']) |
There was a problem hiding this comment.
silicon.calc = abacus (and the subsequent energy/optimization) is outside the TemporaryDirectory() context. This means abacus.directory may already be deleted when the calculation runs, causing failures or writing into a non-existent path. Indent lines 38+ so the calculation runs inside the with tempfile.TemporaryDirectory() block.
| silicon.calc = abacus | |
| e = silicon.get_potential_energy() | |
| opt = BFGS(silicon) | |
| opt.run(fmax=0.05, steps=1) | |
| self.assertLessEqual(silicon.get_potential_energy(), e) | |
| self.assertIsNotNone(silicon.calc.results['forces']) | |
| self.assertIsNotNone(silicon.calc.results['stress']) | |
| silicon.calc = abacus | |
| e = silicon.get_potential_energy() | |
| opt = BFGS(silicon) | |
| opt.run(fmax=0.05, steps=1) | |
| self.assertLessEqual(silicon.get_potential_energy(), e) | |
| self.assertIsNotNone(silicon.calc.results['forces']) | |
| self.assertIsNotNone(silicon.calc.results['stress']) |
| silicon.calc = abacus | ||
| MaxwellBoltzmannDistribution(silicon, temperature_K=300) | ||
| dyn = Langevin(silicon, | ||
| timestep=1.0 * fs, | ||
| temperature_K=300, | ||
| friction=0.01) | ||
| dyn.run(2) |
There was a problem hiding this comment.
Same as relax.py: the MD setup and run occur after leaving the TemporaryDirectory() scope, so the working directory may be removed before ABACUS is invoked. Move lines 41+ inside the with tempfile.TemporaryDirectory() block.
| silicon.calc = abacus | |
| MaxwellBoltzmannDistribution(silicon, temperature_K=300) | |
| dyn = Langevin(silicon, | |
| timestep=1.0 * fs, | |
| temperature_K=300, | |
| friction=0.01) | |
| dyn.run(2) | |
| silicon.calc = abacus | |
| MaxwellBoltzmannDistribution(silicon, temperature_K=300) | |
| dyn = Langevin( | |
| silicon, | |
| timestep=1.0 * fs, | |
| temperature_K=300, | |
| friction=0.01, | |
| ) | |
| dyn.run(2) |
| For a complete list of input parameters, please consult this [instruction](../advanced/input_files/input-main.md). | ||
|
|
||
| > **Note:** Users cannot change the filename “INPUT” to other names. Boolean paramerters such as `out_chg` can be set by using `True` and `False`, `1` and `0`, or `T` and `F`. It is case insensitive so that other preferences such as `true` and `false`, `TRUE` and `FALSE`, and `t` and `f` for setting boolean values are also supported. Specifically for the `out_chg`, `-1` option is also available, which means turn off the checkpoint of charge density in binary (always dumped in `OUT.{suffix}`, whose name ends with `CHARGE-DENSITY.restart`). Some parameters controlling the output also support a second option to control the output precision, e.g., `out_chg 1 8` will output the charge density on realspace grid with 8 digits after the decimal point. | ||
| > **Note:** Users cannot change the filename "INPUT" to other names. Boolean paramerters such as `out_chg` can be set by using `True` and `False`, `1` and `0`, or `T` and `F`. It is case insensitive so that other preferences such as `true` and `false`, `TRUE` and `FALSE`, and `t` and `f` for setting boolean values are also supported. Specifically for the `out_chg`, `-1` option is also available, which means turn off the checkpoint of charge density in binary (always dumped in `OUT.{suffix}`, whose name ends with `CHARGE-DENSITY.restart`). Some parameters controlling the output also support a second option to control the output precision, e.g., `out_chg 1 8` will output the charge density on realspace grid with 8 digits after the decimal point. |
There was a problem hiding this comment.
Fix spelling: 'paramerters' -> 'parameters'.
|
Please submit your PR in deepmodeling/abacus-develop. |
Reminder
Linked Issue
Fix #...
Unit Tests and/or Case Tests for my changes
What's changed?
Any changes of core modules? (ignore if not applicable)