-
Notifications
You must be signed in to change notification settings - Fork 0
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
Added PBC FCIDUMP code #1
base: master
Are you sure you want to change the base?
Conversation
This dumps complex integrals from the pbc k-point code as well as exchange truncated integrals. Contributor List: Alex Thom Verena Neufeld David Kovacs Jiri Etrych
Contributor List: Verena Neufeld Alex Thom David Kovacs Jiri Etrych
Thanks for tagging me here, I've pushed some suggested changes to branch review_jan01 . The main suggested change is removal of need for changes in main pyscf by not creating a new eri array. This also saves memory. |
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.
some small comments
pyscf/tools/pbcfcidump.py
Outdated
for kq in range(nkpts): | ||
for kr in range(nkpts): | ||
ks = kconserv[kp, kq, kr] | ||
# The documentation in pyscf/pbc/lib/kpts_helper.py in |
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.
I am not sure (anymore) what is meant here with an inconsistency. The code in kpts_helper.py seems ok to me. Can you clarify this comment or remove it?
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.
I trace this back to https://github.com/pyscf/pyscf/blob/1.3/pbc/tools/pbc.py
Need to investigate further.
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.
Comment now updated.
return nar, l, dspls, counts # p | ||
|
||
|
||
def exchange_integrals(comm, mf, nmo, kconserv, fout, kstart, kpts): |
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.
this function is slow. An alternative is getting the eris the same way as without exchange treatment but telling pyscf to use exchange treatment there. Might require modifications in main pyscf code though...
pyscf/tools/pbcfcidump.py
Outdated
for p in range(nmo): | ||
for pk in range(nkpts): | ||
for q in range(nmo): | ||
# The documentation in pyscf/pbc/lib/kpts_helper.py in |
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.
see previous comment
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.
Comment now updated.
exchange_integrals(comm, mf, nmo, kconserv, fx, kstart, mf.kpts) | ||
if rank == 0: | ||
fx.close() | ||
# MP meshes with an even number of points in a dimension do not contain |
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.
I don't think this is correct. PySCF's meshes contain the gamma point by default. Might not be gamma centred (not sure this matters?).
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.
Monkhorst-Pack even meshes would properly not contain the gamma point (https://journals.aps.org/prb/pdf/10.1103/PhysRevB.13.5188) but this isn't apparently followed everywhere (https://www.c2x.org.uk/mp_kpoints.htm)
A2B = 1.889725989 | ||
|
||
|
||
def get_ase_atom(formula): |
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.
how similar to pbc/tools/lattice.py?
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.
Very! Have removed and called that code.
In favour of more minimal code additions, I wonder whether the helpers should be deleted and instead examples could be added so that users know how to use pbc fcidump. This would feel more in line with main pyscf. |
I hope this is helpful for now. It was quite a while ago I had looked at this before :D . |
- remove need to modify kccsd_rhf.py
Removed outdated comments about get_kconserv
Thanks for this edit - it's a lot cleaner for integration. I've merged that branch into this. FCIDUMP Tests still pass. |
Added PBC FCIDUMP code