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

Implement surface dipole correction #405

Merged
merged 9 commits into from
Feb 26, 2025
Merged

Conversation

davidbowler
Copy link
Contributor

Implement the surface dipole correction for slab calculations of Neugebauer and Scheffler (PRB 46 16067 (1992)) and Bengtsson (PRB 59 12,301 (1999)). Requires user to specify direction of surface normal and optionally location of dipole correction (in vacuum). Enables output of average electrostatic potential in specified direction (with or without dipole correction). Also added documentation and test for calculation with dipole.

Added calculation of surface dipole to density_module.f90,
along with call from get_H_on_atomfns and small change to
grid_index to allow grid point positions to be a target.

This does not yet include energy or force/stress calculations.
Input parameters now read, and small error corrected: the formula
given by Bengtsson does not include an explicit shift to place the
discontinuity in the vacuum, though it is implied (and should be
there!).
This had not been kept up-to-date, so needed a fast-forward.
Implementation wasn't quite right (difference between the
two key papers) but is now complete.  Just needs
documentation.
Small changes to tidy up potential and output, and added
outline documentation
@davidbowler davidbowler added area: main-source Relating to the src/ directory (main Conquest source code) improves: functionality Adding functionality to code priority: major time: days type: enhancement Planned enhancement being suggested by developers labels Feb 20, 2025
@davidbowler davidbowler added this to the Release v1.5 milestone Feb 20, 2025
@davidbowler davidbowler self-assigned this Feb 20, 2025
The .gitignore file directs all Conquest_o* files to be ignored
so Conquest_out.ref needs to be added with -f
Copy link
Contributor

@tsuyoshi38 tsuyoshi38 left a comment

Choose a reason for hiding this comment

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

Let me ask you one question.
The subroutines like get_band_density in density_module.f90 are also removed, since they are now done in PostProcess, I guess. Am I correct ?

The code for surface dipole correction looks good.
(Can we also treat "charged state" ? )

@davidbowler davidbowler merged commit 049ac20 into develop Feb 26, 2025
8 checks passed
@davidbowler davidbowler deleted the f-dipole-correction branch February 26, 2025 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: main-source Relating to the src/ directory (main Conquest source code) improves: functionality Adding functionality to code priority: major time: days type: enhancement Planned enhancement being suggested by developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants