Skip to content

Refactor: modify EXX realx/md calculation framework#5403

Merged
mohanchen merged 48 commits into
deepmodeling:developfrom
1041176461:develop
Nov 6, 2024
Merged

Refactor: modify EXX realx/md calculation framework#5403
mohanchen merged 48 commits into
deepmodeling:developfrom
1041176461:develop

Conversation

@1041176461

Copy link
Copy Markdown
Collaborator

The new EXX relax/md framework does not need to repeat the PBE calculation to build the density matrix for subsequent ion steps except step 0. Instead, it directly reads the density matrix of the previous step to perform EXX self-consistent calculation, reducing unnecessary self-consistent calculations.

Here are some comparsion

  1. For relax, exx_separate_loop 1, left -> new, right -> old
    image

  2. For relax, exx_separate_loop 0, left -> new, right -> old
    image

  3. For md, exx_separate_loop 1, left -> new, right -> old
    image

  4. For md, exx_separate_loop 0, left -> new, right -> old
    image

1041176461 and others added 30 commits January 21, 2023 23:02
@1041176461 1041176461 requested review from PeizeLin and maki49 November 4, 2024 07:54
@1041176461

Copy link
Copy Markdown
Collaborator Author

For EXX relax/md Integration Test, exx_separate_loop 1 and exx_hybrid_step 2 settings are used. However, the first two EXX outer steps do not fully converge, and the results of the new and old frameworks are different. According to my test above, although the first few outer steps are different, they finally converged to consistent results. Do you have any suggestions on integration testing? @maki49

@maki49

maki49 commented Nov 4, 2024

Copy link
Copy Markdown
Collaborator

@1041176461 You can change the reference results of the related cases.
I find nothing wrong with your code, so I'm confused about why the energy difference is larger than before in first exx-loop (compared to the following exx-loop) in the separate-loop case ( as figure 1 and 3)...
"The density matrix difference resulting from the structure difference contributes more than the difference between pbe and hybrid functional"? hmm... seems make sense

@1041176461

Copy link
Copy Markdown
Collaborator Author

@maki49 Thanks! I changed "result.ref" of tests "285_NO_KP_RE_HSE", "286_NO_KP_CR_HSE", "385_NO_GO_RE_S1_HSE" and "386_NO_GO_MD_S1_HSE". I guess density matrix extrapolation may be a good way to reduce the difference, and corresponding implementations are planned.

@mohanchen mohanchen requested a review from YuLiu98 November 5, 2024 02:49
@mohanchen mohanchen added the EXX and lr-TDDFT Related to EXX or lr-TDDFT label Nov 5, 2024

@WHUweiqingzhou WHUweiqingzhou left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I notice you change the ref. I think these changes should be reviewed by more relevant developers. Could you make a review @PeizeLin ?

@PeizeLin

PeizeLin commented Nov 6, 2024

Copy link
Copy Markdown
Collaborator

I notice you change the ref. I think these changes should be reviewed by more relevant developers. Could you make a review @PeizeLin ?

Since all the Integration Tests are unconverged, the older refs are meaningless when the loop is changed.

@mohanchen mohanchen merged commit cc9d759 into deepmodeling:develop Nov 6, 2024
Fisherd99 pushed a commit to Fisherd99/abacus-BSE that referenced this pull request Mar 31, 2025
* Use template to reconstruct parse_expression

* Feature: output R matrix at each MD step

* Modify'matrix_HS' to 'matrix' for R matrix output

* Merge branches 'develop' and 'develop' of https://github.com/1041176461/abacus-develop into develop

* Fix: modify index in parse_expression

* Fix: add regfree for parse_expression

* Doc: update phonopy doc

* Doc: update phonopy doc

* fix tdos plot for nspin=2

* optimize dosplot for nspin=2

* fix legend for dosplot

* Refactor: modify exx loop for relax/md

* add exx when istep>0

* Update dos.py

* Update esolver_sdft_pw.cpp

* Update lcao_before_scf.cpp

* Update Exx_LRI_interface.h

* Update Exx_LRI_interface.hpp

* Fix: compile error

* Fix: compile error

* Fix: change HSE relax/md result.ref for new framework

* Fix: compile error

* compatible with exx_iter_finish

---------

Co-authored-by: jiyuang <jiyuyang@mail.ustc.com>
Co-authored-by: Qianrui <76200646+Qianruipku@users.noreply.github.com>
Co-authored-by: maki49 <1579492865@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

EXX and lr-TDDFT Related to EXX or lr-TDDFT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants