Added PBC FCIDUMP code#1
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. |
| 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.
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.
I trace this back to https://github.com/pyscf/pyscf/blob/1.3/pbc/tools/pbc.py
Need to investigate further.
| return nar, l, dspls, counts # p | ||
|
|
||
|
|
||
| def exchange_integrals(comm, mf, nmo, kconserv, fout, kstart, kpts): |
There was a problem hiding this comment.
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...
| 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 |
| 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.
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.
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.
how similar to pbc/tools/lattice.py?
There was a problem hiding this comment.
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