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: autoset efield related parameters #3432

Merged
merged 2 commits into from
Jan 4, 2024

Conversation

YuLiu98
Copy link
Collaborator

@YuLiu98 YuLiu98 commented Jan 4, 2024

Linked Issue

Fix #3386

What's changed?

  • Autoset efield_pos_max and efield_pos_dec according to the vacuum region. Specifically, efield_pos_dec is auto-set to one-tenth of the vacuum width, efield_pos_max is auto-set to the center of the vacuum region minus one-twenty of the vacuum width

Copy link
Collaborator

@kirk0830 kirk0830 left a comment

Choose a reason for hiding this comment

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

Thanks for your effort on autoset on dipole correction, this will make ABACUS more user-friendly than before. However, I also leave some comments, please find them and add some explanations accordingly, thanks!

source/module_io/DEFAULT_VALUE.conf Outdated Show resolved Hide resolved
tests/integrate/112_PW_efield/result.ref Outdated Show resolved Hide resolved
source/module_elecstate/potentials/efield.cpp Outdated Show resolved Hide resolved
source/module_elecstate/potentials/efield.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@kirk0830 kirk0830 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 enables the autoset of dipole correction, so that user can pay less attention to finding proper parameter for related parameters.
image

Strictly speaking, this implemented strategy works for static (SCF) calculation but needed to evaluate and widely test for relax cases.
Comparatively in corresponding fixed issue, there is another strategy, in which the minima of charge density averaged on plane whose norm vector is parallel with user-defined direction, is found first and the coordinate is added by half of cell length in that direction, such a position is assumed as center of charge of cell:

image

@Qianruipku Qianruipku merged commit 2290e83 into deepmodeling:develop Jan 4, 2024
11 checks passed
@YuLiu98 YuLiu98 deleted the dipole branch January 5, 2024 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can ABACUS support auto-set of dipole correction related parameters?
3 participants