-
Notifications
You must be signed in to change notification settings - Fork 4
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
Head and wings corrections for k-dTDA #58
Open
mkakcl
wants to merge
36
commits into
master
Choose a base branch
from
HW_TDA_from_master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
d05d6b0
Cleaning up branches
mkakcl 83e7741
Aligning with dRPA and ewald correction added.
mkakcl c4dcf82
Updates to Head term
mkakcl 2b0bb39
kpt changes for rounding
mkakcl 779a964
Changes hopefully fixing the naux issues and subsequent Hermiticity i…
mkakcl 12929dc
Initial wings implementation.
mkakcl 0683748
Small fix
mkakcl f7a844e
Head and wings cleanup
mkakcl 3431d18
Potential MPI fix
mkakcl fdd0b30
More cleanup
mkakcl aff4dc5
A few merge issues resolved
mkakcl ac1ad7e
Linting
mkakcl c7beb4f
More linting
mkakcl 26e873b
Even more linting
mkakcl ad9cdee
Fix kwargs
mkakcl 43370f5
Linting
mkakcl d0acdee
einsum _contraction order correction
mkakcl fe62183
Additional MPI changes
mkakcl 62fd849
Change to util einsums
mkakcl cdc2756
HW test for kTDA
mkakcl 32ad7ea
Merge branch 'master' into HW_TDA_from_master
mkakcl f16b1d9
Update test
mkakcl 1fe4a2c
Frozen static field fix
mkakcl 79d8696
Changes pre discussion in PR
mkakcl f00bbfc
Linting
mkakcl cbe49f8
Further linting
mkakcl 5d845b4
More linting
mkakcl e5e2b1a
Support inheritance for static SE with finite size corrections
obackhouse 1e6a5bd
Fix madelung attribute
obackhouse 7534d99
HWB implementation
mkakcl 5b14ad8
Merge remote-tracking branch 'origin/HW_TDA_from_master' into HW_TDA_…
mkakcl e2941f7
Corrections to HWB implementation
mkakcl d7ebf2d
Example and tests for HWB corrections
mkakcl 7f361ee
Small fix and updated test values
mkakcl b2c0fe7
Some changes related to the old PR and linting.
mkakcl 0818350
Merge branch 'master' into HW_TDA_from_master
mkakcl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
""" | ||
Examples of finite size corrections for `momentGW` calculations for periodic solids. | ||
""" | ||
|
||
import numpy as np | ||
from pyscf.pbc import dft, gto | ||
|
||
from momentGW import KGW, KUGW | ||
|
||
# Define a unit cell | ||
cell = gto.Cell() | ||
cell.atom = "He 0 0 0; He 1 1 1" | ||
cell.basis = "6-31g" | ||
cell.a = np.eye(3) * 3 | ||
cell.verbose = 5 | ||
cell.build() | ||
kpts = cell.make_kpts([3, 1, 1]) | ||
|
||
# Run a DFT calculation | ||
mf = dft.KRKS(cell, kpts) | ||
mf = mf.density_fit() | ||
mf.xc = "b3lyp" | ||
mf.kernel() | ||
|
||
# For any `pbc` calculation a finite size correction can be added for | ||
# the divergence associated with G = 0, q=0 for GDF Coulomb integrals. | ||
# This is done by setting the `fsc` attribute to any combination of | ||
# "H", "W", and/or "B" for the Head, Wings and Body portion of the | ||
# correction. The Ewald correction is added in all cases. The default | ||
# is `None` which disables the correction. | ||
|
||
# RHF reference | ||
gw = KGW(mf) | ||
gw.polarizability = "dRPA" | ||
gw.fsc = "HWB" | ||
gw.kernel(nmom_max=3) | ||
|
||
gw = KGW(mf) | ||
gw.polarizability = "dTDA" | ||
gw.fsc = "HW" | ||
gw.kernel(nmom_max=3) | ||
|
||
gw = KGW(mf) | ||
gw.polarizability = "dRPA" | ||
gw.fsc = "H" | ||
gw.kernel(nmom_max=3) |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.