Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: support segment split in kline mode in KPT file and out_band band output precision control, 8 as default #3493

Merged
merged 10 commits into from
Jan 19, 2024

Conversation

kirk0830
Copy link
Collaborator

@kirk0830 kirk0830 commented Jan 15, 2024

Feature

KPT definition:

K_POINTS
7
Line
0.5 0.0 0.5 20
0.0 0.0 0.0 20
0.5 0.5 0.5 20
0.0 0.0 0.0 1
0.5 0.25 0.75 20
0.375 0.375 0.75 20
0.0 0.0 0.0 1

Yield BANDS_1.dat (old):

1 0  -1.1780821 -1.1780821 3.5863104 3.5863104 7.5672179 7.5672179 17.254004 17.254004
2 0.05  -1.5618087 -0.78125132 3.5969431 3.5969431 7.4457764 7.7269523 17.134492 17.134492
3 0.1  -1.9312159 -0.37261867 3.6288296 3.6288296 7.3616573 7.9257755 16.822897 16.822897
4 0.15  -2.2851939 0.046447221 3.6819311 3.6819311 7.3137027 8.1642149 16.401039 16.401039
5 0.2  -2.6227499 0.47453477 3.7561683 3.7561683 7.3005229 8.4422638 15.925439 15.925439
6 0.25  -2.9430118 0.91021429 3.8514016 3.8514016 7.3204747 8.7589203 15.425992 15.425992
7 0.3  -3.2452223 1.352063 3.9674052 3.9674052 7.3716768 9.1115625 14.917812 14.917812
8 0.35  -3.5287278 1.7986862 4.1038352 4.1038352 7.4520454 9.4952522 14.408749 14.408749
9 0.4  -3.7929632 2.2487265 4.2601946 4.2601946 7.559317 9.902035 13.90313 13.90313
10 0.45  -4.0374387 2.7008507 4.4357897 4.4357897 7.6910357 10.320084 13.403607 13.403607
...
60 2.6887495  -5.3308554 6.5860076 6.6694968 6.6694968 9.4335502 9.4335502 9.437834 10.352636
61 2.7320508  -5.3389262 6.6853424 6.6853424 6.6853424 9.41057 9.41057 9.41057 10.297206
62 3.8500848  -0.96935813 -0.96935813 2.4746746 2.4746746 11.547955 11.547955 12.203653 12.203653
63 3.8677625  -1.0248297 -0.91518804 2.4283394 2.5265494 11.430219 11.578941 12.231493 12.269187
...

now:

   1   0.00000000  -1.17808215  -1.17808215   3.58631044   3.58631044   7.56721792   7.56721792  17.25400414  17.25400414
   2   0.05000000  -1.56180870  -0.78125132   3.59694311   3.59694311   7.44577641   7.72695231  17.13449198  17.13449198
   3   0.10000000  -1.93121589  -0.37261867   3.62882963   3.62882963   7.36165730   7.92577550  16.82289722  16.82289722
   4   0.15000000  -2.28519387   0.04644722   3.68193107   3.68193107   7.31370268   8.16421486  16.40103932  16.40103932
   5   0.20000000  -2.62274991   0.47453477   3.75616827   3.75616827   7.30052289   8.44226385  15.92543920  15.92543920
   6   0.25000000  -2.94301176   0.91021429   3.85140165   3.85140165   7.32047465   8.75892030  15.42599236  15.42599236
   7   0.30000000  -3.24522230   1.35206304   3.96740516   3.96740516   7.37167685   9.11156249  14.91781166  14.91781166
   8   0.35000000  -3.52872775   1.79868623   4.10383518   4.10383518   7.45204541   9.49525218  14.40874856  14.40874856
   9   0.40000000  -3.79296323   2.24872651   4.26019459   4.26019459   7.55931697   9.90203499  13.90312995  13.90312995
  10   0.45000000  -4.03743870   2.70085069   4.43578968   4.43578968   7.69103574  10.32008361  13.40360727  13.40360727
...
  59   2.64544827  -5.30666394   6.31867471   6.62391289   6.62391289   9.47874536   9.49998102   9.49998102  10.53062310
  60   2.68874954  -5.33085537   6.58600762   6.66949681   6.66949681   9.43355016   9.43355016   9.43783401  10.35263609
  61   2.68874954  -5.33892624   6.68534236   6.68534236   6.68534236   9.41056995   9.41056995   9.41056995  10.29720579
  62   3.80678353  -0.96935813  -0.96935813   2.47467459   2.47467459  11.54795528  11.54795528  12.20365346  12.20365346
...

Reminder

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

Linked Issue

Fix #3482, #3456

What's changed?

  • In band calculation, a kpoint with number "1" will always end present line and start a new one. As a result, the second column in BANDS_*.dat will not increase its value at this kpoint.
  • Support user control of output precision, default is 8, right alignment for all columns

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

No

@kirk0830 kirk0830 changed the title Feature: support segment split in kline mode in KPT file and band output precision control Feature: support segment split in kline mode in KPT file and out_band band output precision control, 8 as default Jan 15, 2024
@kirk0830 kirk0830 added Feature Discussed The features will be discussed first but will not be implemented soon Friendliness labels Jan 16, 2024
Copy link
Collaborator

@WHUweiqingzhou WHUweiqingzhou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR avoids inconsistent K-Line band plot induced by inconsistent k-points setting, which fix a user-friendly issue. Meanwhile, this PR adds the precision control in keyword out_band, whose default is 8.
Very good contribution! Thanks for your effort!

@WHUweiqingzhou WHUweiqingzhou merged commit 115a989 into deepmodeling:develop Jan 19, 2024
Flying-dragon-boxing added a commit to Flying-dragon-boxing/abacus-develop that referenced this pull request Jan 28, 2024
* run INPUT.Default() in every process in InputParaTest (deepmodeling#3490)

Co-authored-by: kirk0830 <[email protected]>

* add blas support for FindLAPACK.cmake (deepmodeling#3497)

* more unittest of QO: towards orbital selection (deepmodeling#3499)

* Fix: fix bug in mulliken charge calculation (deepmodeling#3503)

* fix phase

* fix case test

* Refactor: namespace Conv_Coulomb_Pot_K (deepmodeling#3446)

* Refactor: namespace Conv_Coulomb_Pot_K

* Refactor: namespace Conv_Coulomb_Pot_K

---------

Co-authored-by: wqzhou <[email protected]>

* enable the computation of all zeros in one function call (deepmodeling#3449)

Co-authored-by: wqzhou <[email protected]>

* replace ios.eof() by ios.good() to avoid meeting badbit and failbit in reading STRU (deepmodeling#3506)

* Build: add ccache to accelerate the testing process (deepmodeling#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 (deepmodeling#3518)

* to avoid the misunderstanding in docs

* Update docs/quick_start/hands_on.md

Co-authored-by: Chun Cai <[email protected]>

---------

Co-authored-by: Chun Cai <[email protected]>

* Docs: fix a missing depencency in conda build env (deepmodeling#3508)

* Feature: Add ENABLE_RAPIDJSON option to control the output of abacus.json (deepmodeling#3519)

Add ENABLE_RAPIDJSON option to control the output of abacus.json

* Feature: add python wrapper for math sphbes (deepmodeling#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 (deepmodeling#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 (deepmodeling#3523)

* Fix : unit test of module_xc (deepmodeling#3524)

* Fix: omit small magnetic moments to avoid numerical instability (deepmodeling#3530)

* update deltalambda

* avoid numerical error in orbMulP

* add constrain on Mi

* change case reference value

* Fix: fix multiple compiler warnings (deepmodeling#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 (deepmodeling#3496)

Co-authored-by: kirk0830 <[email protected]>

* Build: Improving CMake performance for finding LibXC and ELPA (deepmodeling#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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Docs: correct some docs about mp2 smearing method (deepmodeling#3533)

* correct some docs about mp2 smearing method

* add docs about mv method

* Feature : printing band density (deepmodeling#3501)

Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: wqzhou <[email protected]>

* add some docs for PR#3501 (deepmodeling#3537)

* Feature: enable restart charge density mixing during SCF (deepmodeling#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 (deepmodeling#3551)

Solve the format problem mentioned in issue 3543

* Build: fix compatibility issue against toolchain install (deepmodeling#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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Test: Configure performance tests for math libraries (deepmodeling#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 <[email protected]>

* Configure Makefile Compiling, fix typos

* Fix Makefile Intel toolchains compile errors

* Fix even more PEXSI related Makefile compiling issues

* Update hsolver_pw.cpp (deepmodeling#3556)

when use_uspp==false, overlap matrix should be E.

* Fix: cuda build target (deepmodeling#3276)

* Fix: cuda buid target

* Update CMakeLists.txt

---------

Co-authored-by: Denghui Lu <[email protected]>

---------

Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
@kirk0830 kirk0830 deleted the format-out-band-1 branch February 6, 2024 01:39
mohanchen added a commit that referenced this pull request May 15, 2024
* 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 (#2)

* run INPUT.Default() in every process in InputParaTest (#3490)

Co-authored-by: kirk0830 <[email protected]>

* 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 <[email protected]>

* enable the computation of all zeros in one function call (#3449)

Co-authored-by: wqzhou <[email protected]>

* 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 <[email protected]>

---------

Co-authored-by: Chun Cai <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: wqzhou <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

---------

Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>

* 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

---------

Co-authored-by: zhangzhihao <[email protected]>
Co-authored-by: zhangzh-pku <[email protected]>
Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Mohan Chen <[email protected]>
mohanchen added a commit that referenced this pull request Jul 15, 2024
* 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 (#2)

* run INPUT.Default() in every process in InputParaTest (#3490)

Co-authored-by: kirk0830 <[email protected]>

* 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 <[email protected]>

* enable the computation of all zeros in one function call (#3449)

Co-authored-by: wqzhou <[email protected]>

* 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 <[email protected]>

---------

Co-authored-by: Chun Cai <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: wqzhou <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

---------

Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>

* 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

---------

Co-authored-by: zhangzhihao <[email protected]>
Co-authored-by: zhangzh-pku <[email protected]>
Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Mohan Chen <[email protected]>
mohanchen added a commit that referenced this pull request Aug 9, 2024
…4858)

* 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 (#2)

* run INPUT.Default() in every process in InputParaTest (#3490)

Co-authored-by: kirk0830 <[email protected]>

* 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 <[email protected]>

* enable the computation of all zeros in one function call (#3449)

Co-authored-by: wqzhou <[email protected]>

* 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 <[email protected]>

---------

Co-authored-by: Chun Cai <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: wqzhou <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

---------

Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>

* 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

---------

Co-authored-by: zhangzhihao <[email protected]>
Co-authored-by: zhangzh-pku <[email protected]>
Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Mohan Chen <[email protected]>
mohanchen added a commit that referenced this pull request Mar 7, 2025
…amilt2density (#5973)

* 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 (#2)

* run INPUT.Default() in every process in InputParaTest (#3490)

Co-authored-by: kirk0830 <[email protected]>

* 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 <[email protected]>

* enable the computation of all zeros in one function call (#3449)

Co-authored-by: wqzhou <[email protected]>

* 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 <[email protected]>

---------

Co-authored-by: Chun Cai <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: wqzhou <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

---------

Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>

* 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

---------

Co-authored-by: zhangzhihao <[email protected]>
Co-authored-by: zhangzh-pku <[email protected]>
Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Mohan Chen <[email protected]>
kluophysics pushed a commit to kluophysics/abacus-develop that referenced this pull request Mar 10, 2025
…amilt2density (deepmodeling#5973)

* 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 (deepmodeling#2)

* run INPUT.Default() in every process in InputParaTest (deepmodeling#3490)

Co-authored-by: kirk0830 <[email protected]>

* add blas support for FindLAPACK.cmake (deepmodeling#3497)

* more unittest of QO: towards orbital selection (deepmodeling#3499)

* Fix: fix bug in mulliken charge calculation (deepmodeling#3503)

* fix phase

* fix case test

* Refactor: namespace Conv_Coulomb_Pot_K (deepmodeling#3446)

* Refactor: namespace Conv_Coulomb_Pot_K

* Refactor: namespace Conv_Coulomb_Pot_K

---------

Co-authored-by: wqzhou <[email protected]>

* enable the computation of all zeros in one function call (deepmodeling#3449)

Co-authored-by: wqzhou <[email protected]>

* replace ios.eof() by ios.good() to avoid meeting badbit and failbit in reading STRU (deepmodeling#3506)

* Build: add ccache to accelerate the testing process (deepmodeling#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 (deepmodeling#3518)

* to avoid the misunderstanding in docs

* Update docs/quick_start/hands_on.md

Co-authored-by: Chun Cai <[email protected]>

---------

Co-authored-by: Chun Cai <[email protected]>

* Docs: fix a missing depencency in conda build env (deepmodeling#3508)

* Feature: Add ENABLE_RAPIDJSON option to control the output of abacus.json (deepmodeling#3519)

Add ENABLE_RAPIDJSON option to control the output of abacus.json

* Feature: add python wrapper for math sphbes (deepmodeling#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 (deepmodeling#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 (deepmodeling#3523)

* Fix : unit test of module_xc (deepmodeling#3524)

* Fix: omit small magnetic moments to avoid numerical instability (deepmodeling#3530)

* update deltalambda

* avoid numerical error in orbMulP

* add constrain on Mi

* change case reference value

* Fix: fix multiple compiler warnings (deepmodeling#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 (deepmodeling#3496)

Co-authored-by: kirk0830 <[email protected]>

* Build: Improving CMake performance for finding LibXC and ELPA (deepmodeling#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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Docs: correct some docs about mp2 smearing method (deepmodeling#3533)

* correct some docs about mp2 smearing method

* add docs about mv method

* Feature : printing band density (deepmodeling#3501)

Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: wqzhou <[email protected]>

* add some docs for PR#3501 (deepmodeling#3537)

* Feature: enable restart charge density mixing during SCF (deepmodeling#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 (deepmodeling#3551)

Solve the format problem mentioned in issue 3543

* Build: fix compatibility issue against toolchain install (deepmodeling#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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Test: Configure performance tests for math libraries (deepmodeling#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 <[email protected]>

* Configure Makefile Compiling, fix typos

* Fix Makefile Intel toolchains compile errors

* Fix even more PEXSI related Makefile compiling issues

* Update hsolver_pw.cpp (deepmodeling#3556)

when use_uspp==false, overlap matrix should be E.

* Fix: cuda build target (deepmodeling#3276)

* Fix: cuda buid target

* Update CMakeLists.txt

---------

Co-authored-by: Denghui Lu <[email protected]>

---------

Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>

* 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

---------

Co-authored-by: zhangzhihao <[email protected]>
Co-authored-by: zhangzh-pku <[email protected]>
Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Mohan Chen <[email protected]>
mohanchen added a commit that referenced this pull request Mar 10, 2025
* 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 (#2)

* run INPUT.Default() in every process in InputParaTest (#3490)

Co-authored-by: kirk0830 <[email protected]>

* 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 <[email protected]>

* enable the computation of all zeros in one function call (#3449)

Co-authored-by: wqzhou <[email protected]>

* 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 <[email protected]>

---------

Co-authored-by: Chun Cai <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: wqzhou <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

---------

Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>

* 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

* Tests: Modify Dockerfile and GitHub Workflows

* Fix: wrong abacus link for dockerfile

* Docs: added docs for pexsi inputs

* Tests: three tests added for pexsi

* Fix unit test issues in input_conv

* Very good unit test, making my laptop fan spin

* Change default pexsi_npole from 80 to 40

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

* An unit test added for DiagoPexsi

* modify for changed gint interface

* correct nspin related behaviors

* add efermi passthrough

* Revert "add efermi passthrough"

This reverts commit d7b402d.

* commits to resolve conversations related to codes

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

* add pexsi examples

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

* add building docs for pexsi

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

* Fix: Fix typo related to pexsi

* update to PPEXSIDFTDriver2

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

* Feature: exx operator for pw basis, single kpt

* apply pexsi changes(?)

* q-e style exx_div

* Correct exxdiv

* Fix Compile errors

* refactor to abandon `pdiagh`

* Fix mu_buffer and nspin

* HSE examples

* Feature: Multi-K exx

* Feature: Multi-K exx

* Updates with latest

* Remove redundant global vars

* Update to v3.9.0

* Update to v3.9.0, now code works

* Remove Redundant cal_exx_energy in esolver_ks_pw.cpp

* Some mess

* Minor Fixes

* Fix separate loop and screening

* Add EXX stress

* EXX Energy???

* Multi-K is broken???

* Fix: Multi-K and stress

* Feature: ACE for single-K

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

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

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

* Reconstruct: move exx_helper to hamilt_pwdft

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

* Fix: Add input constraints for EXX PW

* Fix: Remove redundant mpi barrier

* Fix: Clean irrelevant files

* Fix: Clean irrelevant files

* Feature: add ace flag, exit on using gpu

* Refactor: Phase 1 for refactoring exx energy

* Feature: now ace calculates energy

* Feature: enable exx energy

* Fix: fix makefile compilation error

---------

Co-authored-by: zhangzhihao <[email protected]>
Co-authored-by: zhangzh-pku <[email protected]>
Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Mohan Chen <[email protected]>
mohanchen added a commit that referenced this pull request Mar 11, 2025
* 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 (#2)

* run INPUT.Default() in every process in InputParaTest (#3490)

Co-authored-by: kirk0830 <[email protected]>

* 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 <[email protected]>

* enable the computation of all zeros in one function call (#3449)

Co-authored-by: wqzhou <[email protected]>

* 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 <[email protected]>

---------

Co-authored-by: Chun Cai <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: wqzhou <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

---------

Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>

* 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

* Tests: Modify Dockerfile and GitHub Workflows

* Fix: wrong abacus link for dockerfile

* Docs: added docs for pexsi inputs

* Tests: three tests added for pexsi

* Fix unit test issues in input_conv

* Very good unit test, making my laptop fan spin

* Change default pexsi_npole from 80 to 40

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

* An unit test added for DiagoPexsi

* modify for changed gint interface

* correct nspin related behaviors

* add efermi passthrough

* Revert "add efermi passthrough"

This reverts commit d7b402d.

* commits to resolve conversations related to codes

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

* add pexsi examples

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

* add building docs for pexsi

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

* Fix: Fix typo related to pexsi

* update to PPEXSIDFTDriver2

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

* Feature: exx operator for pw basis, single kpt

* apply pexsi changes(?)

* q-e style exx_div

* Correct exxdiv

* Fix Compile errors

* refactor to abandon `pdiagh`

* Fix mu_buffer and nspin

* HSE examples

* Feature: Multi-K exx

* Feature: Multi-K exx

* Updates with latest

* Remove redundant global vars

* Update to v3.9.0

* Update to v3.9.0, now code works

* Remove Redundant cal_exx_energy in esolver_ks_pw.cpp

* Some mess

* Minor Fixes

* Fix separate loop and screening

* Add EXX stress

* EXX Energy???

* Multi-K is broken???

* Fix: Multi-K and stress

* Feature: ACE for single-K

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

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

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

* Reconstruct: move exx_helper to hamilt_pwdft

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

* Fix: Add input constraints for EXX PW

* Fix: Remove redundant mpi barrier

* Fix: Clean irrelevant files

* Fix: Clean irrelevant files

* Feature: add ace flag, exit on using gpu

* Refactor: Phase 1 for refactoring exx energy

* Feature: now ace calculates energy

* Feature: enable exx energy

* Fix: fix makefile compilation error

* Fix: One minor fix for a segmentation fault

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

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

This reverts commit e7b606f.

---------

Co-authored-by: zhangzhihao <[email protected]>
Co-authored-by: zhangzh-pku <[email protected]>
Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Mohan Chen <[email protected]>
kluophysics pushed a commit to kluophysics/abacus-develop that referenced this pull request Mar 13, 2025
* 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 (deepmodeling#2)

* run INPUT.Default() in every process in InputParaTest (deepmodeling#3490)

Co-authored-by: kirk0830 <[email protected]>

* add blas support for FindLAPACK.cmake (deepmodeling#3497)

* more unittest of QO: towards orbital selection (deepmodeling#3499)

* Fix: fix bug in mulliken charge calculation (deepmodeling#3503)

* fix phase

* fix case test

* Refactor: namespace Conv_Coulomb_Pot_K (deepmodeling#3446)

* Refactor: namespace Conv_Coulomb_Pot_K

* Refactor: namespace Conv_Coulomb_Pot_K

---------

Co-authored-by: wqzhou <[email protected]>

* enable the computation of all zeros in one function call (deepmodeling#3449)

Co-authored-by: wqzhou <[email protected]>

* replace ios.eof() by ios.good() to avoid meeting badbit and failbit in reading STRU (deepmodeling#3506)

* Build: add ccache to accelerate the testing process (deepmodeling#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 (deepmodeling#3518)

* to avoid the misunderstanding in docs

* Update docs/quick_start/hands_on.md

Co-authored-by: Chun Cai <[email protected]>

---------

Co-authored-by: Chun Cai <[email protected]>

* Docs: fix a missing depencency in conda build env (deepmodeling#3508)

* Feature: Add ENABLE_RAPIDJSON option to control the output of abacus.json (deepmodeling#3519)

Add ENABLE_RAPIDJSON option to control the output of abacus.json

* Feature: add python wrapper for math sphbes (deepmodeling#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 (deepmodeling#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 (deepmodeling#3523)

* Fix : unit test of module_xc (deepmodeling#3524)

* Fix: omit small magnetic moments to avoid numerical instability (deepmodeling#3530)

* update deltalambda

* avoid numerical error in orbMulP

* add constrain on Mi

* change case reference value

* Fix: fix multiple compiler warnings (deepmodeling#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 (deepmodeling#3496)

Co-authored-by: kirk0830 <[email protected]>

* Build: Improving CMake performance for finding LibXC and ELPA (deepmodeling#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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Docs: correct some docs about mp2 smearing method (deepmodeling#3533)

* correct some docs about mp2 smearing method

* add docs about mv method

* Feature : printing band density (deepmodeling#3501)

Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: wqzhou <[email protected]>

* add some docs for PR#3501 (deepmodeling#3537)

* Feature: enable restart charge density mixing during SCF (deepmodeling#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 (deepmodeling#3551)

Solve the format problem mentioned in issue 3543

* Build: fix compatibility issue against toolchain install (deepmodeling#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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Test: Configure performance tests for math libraries (deepmodeling#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 <[email protected]>

* Configure Makefile Compiling, fix typos

* Fix Makefile Intel toolchains compile errors

* Fix even more PEXSI related Makefile compiling issues

* Update hsolver_pw.cpp (deepmodeling#3556)

when use_uspp==false, overlap matrix should be E.

* Fix: cuda build target (deepmodeling#3276)

* Fix: cuda buid target

* Update CMakeLists.txt

---------

Co-authored-by: Denghui Lu <[email protected]>

---------

Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>

* 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

* Tests: Modify Dockerfile and GitHub Workflows

* Fix: wrong abacus link for dockerfile

* Docs: added docs for pexsi inputs

* Tests: three tests added for pexsi

* Fix unit test issues in input_conv

* Very good unit test, making my laptop fan spin

* Change default pexsi_npole from 80 to 40

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

* An unit test added for DiagoPexsi

* modify for changed gint interface

* correct nspin related behaviors

* add efermi passthrough

* Revert "add efermi passthrough"

This reverts commit d7b402d.

* commits to resolve conversations related to codes

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

* add pexsi examples

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

* add building docs for pexsi

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

* Fix: Fix typo related to pexsi

* update to PPEXSIDFTDriver2

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

* Feature: exx operator for pw basis, single kpt

* apply pexsi changes(?)

* q-e style exx_div

* Correct exxdiv

* Fix Compile errors

* refactor to abandon `pdiagh`

* Fix mu_buffer and nspin

* HSE examples

* Feature: Multi-K exx

* Feature: Multi-K exx

* Updates with latest

* Remove redundant global vars

* Update to v3.9.0

* Update to v3.9.0, now code works

* Remove Redundant cal_exx_energy in esolver_ks_pw.cpp

* Some mess

* Minor Fixes

* Fix separate loop and screening

* Add EXX stress

* EXX Energy???

* Multi-K is broken???

* Fix: Multi-K and stress

* Feature: ACE for single-K

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

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

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

* Reconstruct: move exx_helper to hamilt_pwdft

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

* Fix: Add input constraints for EXX PW

* Fix: Remove redundant mpi barrier

* Fix: Clean irrelevant files

* Fix: Clean irrelevant files

* Feature: add ace flag, exit on using gpu

* Refactor: Phase 1 for refactoring exx energy

* Feature: now ace calculates energy

* Feature: enable exx energy

* Fix: fix makefile compilation error

---------

Co-authored-by: zhangzhihao <[email protected]>
Co-authored-by: zhangzh-pku <[email protected]>
Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Mohan Chen <[email protected]>
kluophysics pushed a commit to kluophysics/abacus-develop that referenced this pull request Mar 13, 2025
* 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 (deepmodeling#2)

* run INPUT.Default() in every process in InputParaTest (deepmodeling#3490)

Co-authored-by: kirk0830 <[email protected]>

* add blas support for FindLAPACK.cmake (deepmodeling#3497)

* more unittest of QO: towards orbital selection (deepmodeling#3499)

* Fix: fix bug in mulliken charge calculation (deepmodeling#3503)

* fix phase

* fix case test

* Refactor: namespace Conv_Coulomb_Pot_K (deepmodeling#3446)

* Refactor: namespace Conv_Coulomb_Pot_K

* Refactor: namespace Conv_Coulomb_Pot_K

---------

Co-authored-by: wqzhou <[email protected]>

* enable the computation of all zeros in one function call (deepmodeling#3449)

Co-authored-by: wqzhou <[email protected]>

* replace ios.eof() by ios.good() to avoid meeting badbit and failbit in reading STRU (deepmodeling#3506)

* Build: add ccache to accelerate the testing process (deepmodeling#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 (deepmodeling#3518)

* to avoid the misunderstanding in docs

* Update docs/quick_start/hands_on.md

Co-authored-by: Chun Cai <[email protected]>

---------

Co-authored-by: Chun Cai <[email protected]>

* Docs: fix a missing depencency in conda build env (deepmodeling#3508)

* Feature: Add ENABLE_RAPIDJSON option to control the output of abacus.json (deepmodeling#3519)

Add ENABLE_RAPIDJSON option to control the output of abacus.json

* Feature: add python wrapper for math sphbes (deepmodeling#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 (deepmodeling#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 (deepmodeling#3523)

* Fix : unit test of module_xc (deepmodeling#3524)

* Fix: omit small magnetic moments to avoid numerical instability (deepmodeling#3530)

* update deltalambda

* avoid numerical error in orbMulP

* add constrain on Mi

* change case reference value

* Fix: fix multiple compiler warnings (deepmodeling#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 (deepmodeling#3496)

Co-authored-by: kirk0830 <[email protected]>

* Build: Improving CMake performance for finding LibXC and ELPA (deepmodeling#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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Docs: correct some docs about mp2 smearing method (deepmodeling#3533)

* correct some docs about mp2 smearing method

* add docs about mv method

* Feature : printing band density (deepmodeling#3501)

Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: wqzhou <[email protected]>

* add some docs for PR#3501 (deepmodeling#3537)

* Feature: enable restart charge density mixing during SCF (deepmodeling#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 (deepmodeling#3551)

Solve the format problem mentioned in issue 3543

* Build: fix compatibility issue against toolchain install (deepmodeling#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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Test: Configure performance tests for math libraries (deepmodeling#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 <[email protected]>

* Configure Makefile Compiling, fix typos

* Fix Makefile Intel toolchains compile errors

* Fix even more PEXSI related Makefile compiling issues

* Update hsolver_pw.cpp (deepmodeling#3556)

when use_uspp==false, overlap matrix should be E.

* Fix: cuda build target (deepmodeling#3276)

* Fix: cuda buid target

* Update CMakeLists.txt

---------

Co-authored-by: Denghui Lu <[email protected]>

---------

Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>

* 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

* Tests: Modify Dockerfile and GitHub Workflows

* Fix: wrong abacus link for dockerfile

* Docs: added docs for pexsi inputs

* Tests: three tests added for pexsi

* Fix unit test issues in input_conv

* Very good unit test, making my laptop fan spin

* Change default pexsi_npole from 80 to 40

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

* An unit test added for DiagoPexsi

* modify for changed gint interface

* correct nspin related behaviors

* add efermi passthrough

* Revert "add efermi passthrough"

This reverts commit d7b402d.

* commits to resolve conversations related to codes

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

* add pexsi examples

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

* add building docs for pexsi

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

* Fix: Fix typo related to pexsi

* update to PPEXSIDFTDriver2

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

* Feature: exx operator for pw basis, single kpt

* apply pexsi changes(?)

* q-e style exx_div

* Correct exxdiv

* Fix Compile errors

* refactor to abandon `pdiagh`

* Fix mu_buffer and nspin

* HSE examples

* Feature: Multi-K exx

* Feature: Multi-K exx

* Updates with latest

* Remove redundant global vars

* Update to v3.9.0

* Update to v3.9.0, now code works

* Remove Redundant cal_exx_energy in esolver_ks_pw.cpp

* Some mess

* Minor Fixes

* Fix separate loop and screening

* Add EXX stress

* EXX Energy???

* Multi-K is broken???

* Fix: Multi-K and stress

* Feature: ACE for single-K

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

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

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

* Reconstruct: move exx_helper to hamilt_pwdft

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

* Fix: Add input constraints for EXX PW

* Fix: Remove redundant mpi barrier

* Fix: Clean irrelevant files

* Fix: Clean irrelevant files

* Feature: add ace flag, exit on using gpu

* Refactor: Phase 1 for refactoring exx energy

* Feature: now ace calculates energy

* Feature: enable exx energy

* Fix: fix makefile compilation error

* Fix: One minor fix for a segmentation fault

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

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

This reverts commit e7b606f.

---------

Co-authored-by: zhangzhihao <[email protected]>
Co-authored-by: zhangzh-pku <[email protected]>
Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Mohan Chen <[email protected]>
kluophysics pushed a commit to kluophysics/abacus-develop that referenced this pull request Mar 14, 2025
* 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 (deepmodeling#2)

* run INPUT.Default() in every process in InputParaTest (deepmodeling#3490)

Co-authored-by: kirk0830 <[email protected]>

* add blas support for FindLAPACK.cmake (deepmodeling#3497)

* more unittest of QO: towards orbital selection (deepmodeling#3499)

* Fix: fix bug in mulliken charge calculation (deepmodeling#3503)

* fix phase

* fix case test

* Refactor: namespace Conv_Coulomb_Pot_K (deepmodeling#3446)

* Refactor: namespace Conv_Coulomb_Pot_K

* Refactor: namespace Conv_Coulomb_Pot_K

---------

Co-authored-by: wqzhou <[email protected]>

* enable the computation of all zeros in one function call (deepmodeling#3449)

Co-authored-by: wqzhou <[email protected]>

* replace ios.eof() by ios.good() to avoid meeting badbit and failbit in reading STRU (deepmodeling#3506)

* Build: add ccache to accelerate the testing process (deepmodeling#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 (deepmodeling#3518)

* to avoid the misunderstanding in docs

* Update docs/quick_start/hands_on.md

Co-authored-by: Chun Cai <[email protected]>

---------

Co-authored-by: Chun Cai <[email protected]>

* Docs: fix a missing depencency in conda build env (deepmodeling#3508)

* Feature: Add ENABLE_RAPIDJSON option to control the output of abacus.json (deepmodeling#3519)

Add ENABLE_RAPIDJSON option to control the output of abacus.json

* Feature: add python wrapper for math sphbes (deepmodeling#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 (deepmodeling#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 (deepmodeling#3523)

* Fix : unit test of module_xc (deepmodeling#3524)

* Fix: omit small magnetic moments to avoid numerical instability (deepmodeling#3530)

* update deltalambda

* avoid numerical error in orbMulP

* add constrain on Mi

* change case reference value

* Fix: fix multiple compiler warnings (deepmodeling#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 (deepmodeling#3496)

Co-authored-by: kirk0830 <[email protected]>

* Build: Improving CMake performance for finding LibXC and ELPA (deepmodeling#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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Docs: correct some docs about mp2 smearing method (deepmodeling#3533)

* correct some docs about mp2 smearing method

* add docs about mv method

* Feature : printing band density (deepmodeling#3501)

Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: wqzhou <[email protected]>

* add some docs for PR#3501 (deepmodeling#3537)

* Feature: enable restart charge density mixing during SCF (deepmodeling#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 (deepmodeling#3551)

Solve the format problem mentioned in issue 3543

* Build: fix compatibility issue against toolchain install (deepmodeling#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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Test: Configure performance tests for math libraries (deepmodeling#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 <[email protected]>

* Configure Makefile Compiling, fix typos

* Fix Makefile Intel toolchains compile errors

* Fix even more PEXSI related Makefile compiling issues

* Update hsolver_pw.cpp (deepmodeling#3556)

when use_uspp==false, overlap matrix should be E.

* Fix: cuda build target (deepmodeling#3276)

* Fix: cuda buid target

* Update CMakeLists.txt

---------

Co-authored-by: Denghui Lu <[email protected]>

---------

Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>

* 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

* Tests: Modify Dockerfile and GitHub Workflows

* Fix: wrong abacus link for dockerfile

* Docs: added docs for pexsi inputs

* Tests: three tests added for pexsi

* Fix unit test issues in input_conv

* Very good unit test, making my laptop fan spin

* Change default pexsi_npole from 80 to 40

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

* An unit test added for DiagoPexsi

* modify for changed gint interface

* correct nspin related behaviors

* add efermi passthrough

* Revert "add efermi passthrough"

This reverts commit d7b402d.

* commits to resolve conversations related to codes

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

* add pexsi examples

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

* add building docs for pexsi

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

* Fix: Fix typo related to pexsi

* update to PPEXSIDFTDriver2

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

* Feature: exx operator for pw basis, single kpt

* apply pexsi changes(?)

* q-e style exx_div

* Correct exxdiv

* Fix Compile errors

* refactor to abandon `pdiagh`

* Fix mu_buffer and nspin

* HSE examples

* Feature: Multi-K exx

* Feature: Multi-K exx

* Updates with latest

* Remove redundant global vars

* Update to v3.9.0

* Update to v3.9.0, now code works

* Remove Redundant cal_exx_energy in esolver_ks_pw.cpp

* Some mess

* Minor Fixes

* Fix separate loop and screening

* Add EXX stress

* EXX Energy???

* Multi-K is broken???

* Fix: Multi-K and stress

* Feature: ACE for single-K

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

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

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

* Reconstruct: move exx_helper to hamilt_pwdft

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

* Fix: Add input constraints for EXX PW

* Fix: Remove redundant mpi barrier

* Fix: Clean irrelevant files

* Fix: Clean irrelevant files

* Feature: add ace flag, exit on using gpu

* Refactor: Phase 1 for refactoring exx energy

* Feature: now ace calculates energy

* Feature: enable exx energy

* Fix: fix makefile compilation error

---------

Co-authored-by: zhangzhihao <[email protected]>
Co-authored-by: zhangzh-pku <[email protected]>
Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Mohan Chen <[email protected]>
kluophysics pushed a commit to kluophysics/abacus-develop that referenced this pull request Mar 14, 2025
* 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 (deepmodeling#2)

* run INPUT.Default() in every process in InputParaTest (deepmodeling#3490)

Co-authored-by: kirk0830 <[email protected]>

* add blas support for FindLAPACK.cmake (deepmodeling#3497)

* more unittest of QO: towards orbital selection (deepmodeling#3499)

* Fix: fix bug in mulliken charge calculation (deepmodeling#3503)

* fix phase

* fix case test

* Refactor: namespace Conv_Coulomb_Pot_K (deepmodeling#3446)

* Refactor: namespace Conv_Coulomb_Pot_K

* Refactor: namespace Conv_Coulomb_Pot_K

---------

Co-authored-by: wqzhou <[email protected]>

* enable the computation of all zeros in one function call (deepmodeling#3449)

Co-authored-by: wqzhou <[email protected]>

* replace ios.eof() by ios.good() to avoid meeting badbit and failbit in reading STRU (deepmodeling#3506)

* Build: add ccache to accelerate the testing process (deepmodeling#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 (deepmodeling#3518)

* to avoid the misunderstanding in docs

* Update docs/quick_start/hands_on.md

Co-authored-by: Chun Cai <[email protected]>

---------

Co-authored-by: Chun Cai <[email protected]>

* Docs: fix a missing depencency in conda build env (deepmodeling#3508)

* Feature: Add ENABLE_RAPIDJSON option to control the output of abacus.json (deepmodeling#3519)

Add ENABLE_RAPIDJSON option to control the output of abacus.json

* Feature: add python wrapper for math sphbes (deepmodeling#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 (deepmodeling#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 (deepmodeling#3523)

* Fix : unit test of module_xc (deepmodeling#3524)

* Fix: omit small magnetic moments to avoid numerical instability (deepmodeling#3530)

* update deltalambda

* avoid numerical error in orbMulP

* add constrain on Mi

* change case reference value

* Fix: fix multiple compiler warnings (deepmodeling#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 (deepmodeling#3496)

Co-authored-by: kirk0830 <[email protected]>

* Build: Improving CMake performance for finding LibXC and ELPA (deepmodeling#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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Docs: correct some docs about mp2 smearing method (deepmodeling#3533)

* correct some docs about mp2 smearing method

* add docs about mv method

* Feature : printing band density (deepmodeling#3501)

Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: wqzhou <[email protected]>

* add some docs for PR#3501 (deepmodeling#3537)

* Feature: enable restart charge density mixing during SCF (deepmodeling#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 (deepmodeling#3551)

Solve the format problem mentioned in issue 3543

* Build: fix compatibility issue against toolchain install (deepmodeling#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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Test: Configure performance tests for math libraries (deepmodeling#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 <[email protected]>

* Configure Makefile Compiling, fix typos

* Fix Makefile Intel toolchains compile errors

* Fix even more PEXSI related Makefile compiling issues

* Update hsolver_pw.cpp (deepmodeling#3556)

when use_uspp==false, overlap matrix should be E.

* Fix: cuda build target (deepmodeling#3276)

* Fix: cuda buid target

* Update CMakeLists.txt

---------

Co-authored-by: Denghui Lu <[email protected]>

---------

Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>

* 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

* Tests: Modify Dockerfile and GitHub Workflows

* Fix: wrong abacus link for dockerfile

* Docs: added docs for pexsi inputs

* Tests: three tests added for pexsi

* Fix unit test issues in input_conv

* Very good unit test, making my laptop fan spin

* Change default pexsi_npole from 80 to 40

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

* An unit test added for DiagoPexsi

* modify for changed gint interface

* correct nspin related behaviors

* add efermi passthrough

* Revert "add efermi passthrough"

This reverts commit d7b402d.

* commits to resolve conversations related to codes

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

* add pexsi examples

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

* add building docs for pexsi

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

* Fix: Fix typo related to pexsi

* update to PPEXSIDFTDriver2

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

* Feature: exx operator for pw basis, single kpt

* apply pexsi changes(?)

* q-e style exx_div

* Correct exxdiv

* Fix Compile errors

* refactor to abandon `pdiagh`

* Fix mu_buffer and nspin

* HSE examples

* Feature: Multi-K exx

* Feature: Multi-K exx

* Updates with latest

* Remove redundant global vars

* Update to v3.9.0

* Update to v3.9.0, now code works

* Remove Redundant cal_exx_energy in esolver_ks_pw.cpp

* Some mess

* Minor Fixes

* Fix separate loop and screening

* Add EXX stress

* EXX Energy???

* Multi-K is broken???

* Fix: Multi-K and stress

* Feature: ACE for single-K

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

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

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

* Reconstruct: move exx_helper to hamilt_pwdft

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

* Fix: Add input constraints for EXX PW

* Fix: Remove redundant mpi barrier

* Fix: Clean irrelevant files

* Fix: Clean irrelevant files

* Feature: add ace flag, exit on using gpu

* Refactor: Phase 1 for refactoring exx energy

* Feature: now ace calculates energy

* Feature: enable exx energy

* Fix: fix makefile compilation error

* Fix: One minor fix for a segmentation fault

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

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

This reverts commit e7b606f.

---------

Co-authored-by: zhangzhihao <[email protected]>
Co-authored-by: zhangzh-pku <[email protected]>
Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Mohan Chen <[email protected]>
mohanchen added a commit that referenced this pull request Mar 14, 2025
…pw works (#5994)

* 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 (#2)

* run INPUT.Default() in every process in InputParaTest (#3490)

Co-authored-by: kirk0830 <[email protected]>

* 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 <[email protected]>

* enable the computation of all zeros in one function call (#3449)

Co-authored-by: wqzhou <[email protected]>

* 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 <[email protected]>

---------

Co-authored-by: Chun Cai <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: wqzhou <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

---------

Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>

* 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

* Tests: Modify Dockerfile and GitHub Workflows

* Fix: wrong abacus link for dockerfile

* Docs: added docs for pexsi inputs

* Tests: three tests added for pexsi

* Fix unit test issues in input_conv

* Very good unit test, making my laptop fan spin

* Change default pexsi_npole from 80 to 40

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

* An unit test added for DiagoPexsi

* modify for changed gint interface

* correct nspin related behaviors

* add efermi passthrough

* Revert "add efermi passthrough"

This reverts commit d7b402d.

* commits to resolve conversations related to codes

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

* add pexsi examples

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

* add building docs for pexsi

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

* Fix: Fix typo related to pexsi

* update to PPEXSIDFTDriver2

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

* Feature: exx operator for pw basis, single kpt

* apply pexsi changes(?)

* q-e style exx_div

* Correct exxdiv

* Fix Compile errors

* refactor to abandon `pdiagh`

* Fix mu_buffer and nspin

* HSE examples

* Feature: Multi-K exx

* Feature: Multi-K exx

* Updates with latest

* Remove redundant global vars

* Update to v3.9.0

* Update to v3.9.0, now code works

* Remove Redundant cal_exx_energy in esolver_ks_pw.cpp

* Some mess

* Minor Fixes

* Fix separate loop and screening

* Add EXX stress

* EXX Energy???

* Multi-K is broken???

* Fix: Multi-K and stress

* Feature: ACE for single-K

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

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

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

* Reconstruct: move exx_helper to hamilt_pwdft

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

* Fix: Add input constraints for EXX PW

* Fix: Remove redundant mpi barrier

* Fix: Clean irrelevant files

* Fix: Clean irrelevant files

* Feature: add ace flag, exit on using gpu

* Refactor: Phase 1 for refactoring exx energy

* Feature: now ace calculates energy

* Feature: enable exx energy

* Fix: fix makefile compilation error

* Fix: One minor fix for a segmentation fault

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

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

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

---------

Co-authored-by: zhangzhihao <[email protected]>
Co-authored-by: zhangzh-pku <[email protected]>
Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Mohan Chen <[email protected]>
kluophysics pushed a commit to kluophysics/abacus-develop that referenced this pull request Mar 17, 2025
…pw works (deepmodeling#5994)

* 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 (deepmodeling#2)

* run INPUT.Default() in every process in InputParaTest (deepmodeling#3490)

Co-authored-by: kirk0830 <[email protected]>

* add blas support for FindLAPACK.cmake (deepmodeling#3497)

* more unittest of QO: towards orbital selection (deepmodeling#3499)

* Fix: fix bug in mulliken charge calculation (deepmodeling#3503)

* fix phase

* fix case test

* Refactor: namespace Conv_Coulomb_Pot_K (deepmodeling#3446)

* Refactor: namespace Conv_Coulomb_Pot_K

* Refactor: namespace Conv_Coulomb_Pot_K

---------

Co-authored-by: wqzhou <[email protected]>

* enable the computation of all zeros in one function call (deepmodeling#3449)

Co-authored-by: wqzhou <[email protected]>

* replace ios.eof() by ios.good() to avoid meeting badbit and failbit in reading STRU (deepmodeling#3506)

* Build: add ccache to accelerate the testing process (deepmodeling#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 (deepmodeling#3518)

* to avoid the misunderstanding in docs

* Update docs/quick_start/hands_on.md

Co-authored-by: Chun Cai <[email protected]>

---------

Co-authored-by: Chun Cai <[email protected]>

* Docs: fix a missing depencency in conda build env (deepmodeling#3508)

* Feature: Add ENABLE_RAPIDJSON option to control the output of abacus.json (deepmodeling#3519)

Add ENABLE_RAPIDJSON option to control the output of abacus.json

* Feature: add python wrapper for math sphbes (deepmodeling#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 (deepmodeling#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 (deepmodeling#3523)

* Fix : unit test of module_xc (deepmodeling#3524)

* Fix: omit small magnetic moments to avoid numerical instability (deepmodeling#3530)

* update deltalambda

* avoid numerical error in orbMulP

* add constrain on Mi

* change case reference value

* Fix: fix multiple compiler warnings (deepmodeling#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 (deepmodeling#3496)

Co-authored-by: kirk0830 <[email protected]>

* Build: Improving CMake performance for finding LibXC and ELPA (deepmodeling#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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Docs: correct some docs about mp2 smearing method (deepmodeling#3533)

* correct some docs about mp2 smearing method

* add docs about mv method

* Feature : printing band density (deepmodeling#3501)

Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: wqzhou <[email protected]>

* add some docs for PR#3501 (deepmodeling#3537)

* Feature: enable restart charge density mixing during SCF (deepmodeling#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 (deepmodeling#3551)

Solve the format problem mentioned in issue 3543

* Build: fix compatibility issue against toolchain install (deepmodeling#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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Test: Configure performance tests for math libraries (deepmodeling#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 <[email protected]>

* Configure Makefile Compiling, fix typos

* Fix Makefile Intel toolchains compile errors

* Fix even more PEXSI related Makefile compiling issues

* Update hsolver_pw.cpp (deepmodeling#3556)

when use_uspp==false, overlap matrix should be E.

* Fix: cuda build target (deepmodeling#3276)

* Fix: cuda buid target

* Update CMakeLists.txt

---------

Co-authored-by: Denghui Lu <[email protected]>

---------

Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>

* 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

* Tests: Modify Dockerfile and GitHub Workflows

* Fix: wrong abacus link for dockerfile

* Docs: added docs for pexsi inputs

* Tests: three tests added for pexsi

* Fix unit test issues in input_conv

* Very good unit test, making my laptop fan spin

* Change default pexsi_npole from 80 to 40

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

* An unit test added for DiagoPexsi

* modify for changed gint interface

* correct nspin related behaviors

* add efermi passthrough

* Revert "add efermi passthrough"

This reverts commit d7b402d.

* commits to resolve conversations related to codes

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

* add pexsi examples

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

* add building docs for pexsi

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

* Fix: Fix typo related to pexsi

* update to PPEXSIDFTDriver2

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

* Feature: exx operator for pw basis, single kpt

* apply pexsi changes(?)

* q-e style exx_div

* Correct exxdiv

* Fix Compile errors

* refactor to abandon `pdiagh`

* Fix mu_buffer and nspin

* HSE examples

* Feature: Multi-K exx

* Feature: Multi-K exx

* Updates with latest

* Remove redundant global vars

* Update to v3.9.0

* Update to v3.9.0, now code works

* Remove Redundant cal_exx_energy in esolver_ks_pw.cpp

* Some mess

* Minor Fixes

* Fix separate loop and screening

* Add EXX stress

* EXX Energy???

* Multi-K is broken???

* Fix: Multi-K and stress

* Feature: ACE for single-K

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

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

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

* Reconstruct: move exx_helper to hamilt_pwdft

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

* Fix: Add input constraints for EXX PW

* Fix: Remove redundant mpi barrier

* Fix: Clean irrelevant files

* Fix: Clean irrelevant files

* Feature: add ace flag, exit on using gpu

* Refactor: Phase 1 for refactoring exx energy

* Feature: now ace calculates energy

* Feature: enable exx energy

* Fix: fix makefile compilation error

* Fix: One minor fix for a segmentation fault

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

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

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

---------

Co-authored-by: zhangzhihao <[email protected]>
Co-authored-by: zhangzh-pku <[email protected]>
Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Mohan Chen <[email protected]>
mohanchen added a commit that referenced this pull request Mar 24, 2025
* 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 (#2)

* run INPUT.Default() in every process in InputParaTest (#3490)

Co-authored-by: kirk0830 <[email protected]>

* 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 <[email protected]>

* enable the computation of all zeros in one function call (#3449)

Co-authored-by: wqzhou <[email protected]>

* 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 <[email protected]>

---------

Co-authored-by: Chun Cai <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: wqzhou <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

---------

Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>

* 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

* Tests: Modify Dockerfile and GitHub Workflows

* Fix: wrong abacus link for dockerfile

* Docs: added docs for pexsi inputs

* Tests: three tests added for pexsi

* Fix unit test issues in input_conv

* Very good unit test, making my laptop fan spin

* Change default pexsi_npole from 80 to 40

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

* An unit test added for DiagoPexsi

* modify for changed gint interface

* correct nspin related behaviors

* add efermi passthrough

* Revert "add efermi passthrough"

This reverts commit d7b402d.

* commits to resolve conversations related to codes

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

* add pexsi examples

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

* add building docs for pexsi

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

* Fix: Fix typo related to pexsi

* update to PPEXSIDFTDriver2

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

* Feature: exx operator for pw basis, single kpt

* apply pexsi changes(?)

* q-e style exx_div

* Correct exxdiv

* Fix Compile errors

* refactor to abandon `pdiagh`

* Fix mu_buffer and nspin

* HSE examples

* Feature: Multi-K exx

* Feature: Multi-K exx

* Updates with latest

* Remove redundant global vars

* Update to v3.9.0

* Update to v3.9.0, now code works

* Remove Redundant cal_exx_energy in esolver_ks_pw.cpp

* Some mess

* Minor Fixes

* Fix separate loop and screening

* Add EXX stress

* EXX Energy???

* Multi-K is broken???

* Fix: Multi-K and stress

* Feature: ACE for single-K

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

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

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

* Reconstruct: move exx_helper to hamilt_pwdft

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

* Fix: Add input constraints for EXX PW

* Fix: Remove redundant mpi barrier

* Fix: Clean irrelevant files

* Fix: Clean irrelevant files

* Feature: add ace flag, exit on using gpu

* Refactor: Phase 1 for refactoring exx energy

* Feature: now ace calculates energy

* Feature: enable exx energy

* Fix: fix makefile compilation error

* Fix: One minor fix for a segmentation fault

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

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

This reverts commit e7b606f.

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

---------

Co-authored-by: zhangzhihao <[email protected]>
Co-authored-by: zhangzh-pku <[email protected]>
Co-authored-by: wqzhou <[email protected]>
Co-authored-by: kirk0830 <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Zhao Tianqi <[email protected]>
Co-authored-by: PeizeLin <[email protected]>
Co-authored-by: jinzx10 <[email protected]>
Co-authored-by: Chun Cai <[email protected]>
Co-authored-by: Peng Xingliang <[email protected]>
Co-authored-by: Jie Li <[email protected]>
Co-authored-by: Wenfei Li <[email protected]>
Co-authored-by: Denghui Lu <[email protected]>
Co-authored-by: YI Zeping <[email protected]>
Co-authored-by: wenfei-li <[email protected]>
Co-authored-by: jingan-181 <[email protected]>
Co-authored-by: StarGrys <[email protected]>
Co-authored-by: Haozhi Han <[email protected]>
Co-authored-by: Mohan Chen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Discussed The features will be discussed first but will not be implemented soon
Projects
None yet
2 participants