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

Fix: solve the convergence problem of E value in dav_subspace method (Useful to know how to avoid adding GlobalV) #4052

Merged
merged 17 commits into from
May 7, 2024

Conversation

haozhihan
Copy link
Collaborator

@haozhihan haozhihan commented Apr 24, 2024

Reminder

  • Have you linked an issue with this pull request?

Linked Issue

#3447

Details

  • In this PR, I added an input parameter called diago_full_acc referring to Q-E's documentation.
  • diago_full_acc can achieve a good balance between energy convergence accuracy and computational efficiency.

@haozhihan
Copy link
Collaborator Author

I will test more cases to prove that this PR is OK for coverage in dav_subspace. So, You can wait until I release the test results and then merge this PR.

@haozhihan
Copy link
Collaborator Author

I ran some more tests and got the results below. Please @WHUweiqingzhou and @pxlxingliang help me see if this convergence result is acceptable.

cases EDIFF(eV) in last scf
AlMg_8 -4.631041e-06
AlMg_12 -7.404141e-06
AlMg_16 -2.779601e-06
AlMg_20 -4.197651e-06
AlMg_24 -2.312573e-07
AlMg_40 -9.019758e-07
AlMg_48 -1.821498e-07
AlMg_pd04_8 -2.425136e-06
AlMg_pd04_12 1.218164e-08
AlMg_pd04_16 -6.655961e-06
AlMg_pd04_20 -2.506580e-06
AlMg_pd04_24 -8.934190e-07
AlMg_pd04_32 -7.040424e-07
AlMg_pd04_40 -3.453822e-06
AlMg_pd04_48 -3.094913e-06
LiLaH_8 -6.755438e-07
LiLaH_12 -7.632281e-07
LiLaH_16 -2.478116e-07
LiLaH_20 -1.349498e-06
LiLaH_24 -9.087260e-07
LiLaH_32 -1.052319e-06
LiLaH_40 -2.673772e-06

@haozhihan
Copy link
Collaborator Author

haozhihan commented Apr 26, 2024

I will retest whether the EDIFF of these cases is reasonable based on the latest commit code.

@haozhihan
Copy link
Collaborator Author

Update the result based on the last commit code.

cases EDIFF(eV) in last scf
AlMg_8 -6.046425e-06
AlMg_12 -2.746880e-07
AlMg_16 -5.684387e-07
AlMg_20 -3.998047e-06
AlMg_24 -7.705483e-08
AlMg_40 -1.073471e-07
AlMg_48 -4.129307e-08
AlMg_pd04_8 -9.503761e-06
AlMg_pd04_12 -6.331262e-07
AlMg_pd04_16 -9.597795e-08
AlMg_pd04_20 -5.293841e-06
AlMg_pd04_24 -2.444094e-07
AlMg_pd04_32 -9.223745e-07
AlMg_pd04_40 -3.371806e-09
AlMg_pd04_48 8.884871e-08
LiLaH_8 -1.194614e-07
LiLaH_12 -1.581466e-06
LiLaH_16 -1.643565e-06
LiLaH_20 -3.617514e-08
LiLaH_24 -8.098816e-07
LiLaH_32 1.395165e-08
LiLaH_40 -8.427895e-07

We can see that the maximum EDIFF is approximately in the order of 1e-6. This is completely acceptable.

The above results are calculated under the default condition of diago_full_acc=false.

When diago_full_acc=true, higher precision calculation results will be obtained.

source/module_base/global_variable.cpp Outdated Show resolved Hide resolved
source/module_base/global_variable.h Outdated Show resolved Hide resolved
source/module_hsolver/diago_dav_subspace.h Outdated Show resolved Hide resolved
source/module_hsolver/hsolver_pw.cpp Outdated Show resolved Hide resolved
@haozhihan haozhihan changed the title Fix: solve the coverage problem of E value in dav_subspace method Fix: solve the convergence problem of E value in dav_subspace method May 2, 2024
docs/advanced/input_files/input-main.md Outdated Show resolved Hide resolved
source/module_hsolver/diago_dav_subspace.cpp Outdated Show resolved Hide resolved
source/module_hsolver/diago_dav_subspace.h Show resolved Hide resolved
source/module_hsolver/hsolver_pw.cpp Show resolved Hide resolved
source/module_hsolver/hsolver_pw.h Show resolved Hide resolved
@mohanchen mohanchen removed the hsolver label May 5, 2024
Copy link
Collaborator

@mohanchen mohanchen left a comment

Choose a reason for hiding this comment

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

LGTM

@mohanchen mohanchen merged commit 4385149 into deepmodeling:develop May 7, 2024
13 checks passed
@mohanchen mohanchen added the Useful Information Useful information for others to learn/study label May 7, 2024
@mohanchen
Copy link
Collaborator

This PR shows how to avoid using GlobalV to add new input parameters.

@mohanchen mohanchen changed the title Fix: solve the convergence problem of E value in dav_subspace method Fix: solve the convergence problem of E value in dav_subspace method (Useful to know how to avoid adding GlobalV) May 22, 2024
@haozhihan haozhihan deleted the dav_subspace/coverage branch May 23, 2024 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Useful Information Useful information for others to learn/study
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants