Feature: a promising angle mixing method for non-colinear calculations#3356
Merged
Qianruipku merged 12 commits intodeepmodeling:developfrom Dec 21, 2023
Merged
Feature: a promising angle mixing method for non-colinear calculations#3356Qianruipku merged 12 commits intodeepmodeling:developfrom
Qianruipku merged 12 commits intodeepmodeling:developfrom
Conversation
…op into mixing_angle
Qianruipku
approved these changes
Dec 21, 2023
dyzheng
reviewed
Dec 21, 2023
Collaborator
dyzheng
left a comment
There was a problem hiding this comment.
Thanks for your contribution, mixing method for noncollinear spin will be improved with this PR.
| - **Description**: the minimum kerker coefficient | ||
| - **Default**: 0.1 | ||
|
|
||
| ### mixing_angle |
Collaborator
There was a problem hiding this comment.
Please update the description in https://abacus.deepmodeling.com/en/latest/advanced/scf/converge.html#charge-mixing for new mixing parameters.
| ### mixing_angle | ||
|
|
||
| - **Type**: Real | ||
| - **Availability**: Only relevant for non-colinear calculations `nspin=4`. |
Collaborator
There was a problem hiding this comment.
Users often set "lspinorb=1" or "noncolin=1" rather than "nspin=4".
| double mixing_beta_mag; | ||
| double mixing_gg0_mag; | ||
| double mixing_gg0_min; | ||
| double mixing_angle; |
Collaborator
There was a problem hiding this comment.
Please add unit-test for this mixing_angle parameter.
| double rnorm = 0.0; | ||
| // consider a resize for mixing_angle | ||
| int resize_tmp = 1; | ||
| if (GlobalV::NSPIN == 4 && GlobalV::MIXING_ANGLE > 0) resize_tmp = 2; |
Collaborator
There was a problem hiding this comment.
I hope you can replace the use of "GlobalV" with local variables or class members in Charge_Mixing code.
16 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked Issue
Fix #3336. As is mentioned in Issue #3336, If one is not interested in the energies of a given magnetic configuration but wants to determine the ground state by relaxing the magnetic moments’ directions, one cannot rely on the standard Broyden mixing algorithm.
To enhance ABACUS's ability to find correct magnetic configuration for non-colinear calculations, I implement a promising mixing method proposed by J. Phys. Soc. Jpn. 82 (2013) 114706.
b.t.w, in this PR, I only realize a special case with angle mixing parameter is 1 NOW.
What's changed?
mixing_angleto control if this method is used.mix_rho_real()andmix_rho_recip_new().resize_tmpin Kerker and inner_product to corporate with new angle mixing method.Charge_Mixing::Kerker_screen_real_test().Notice that:
mixing_angle 1mixing_beta_mag >> mixing_beta, andmixing_beta_magis around 1.