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

Added PBC FCIDUMP code #1

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Added PBC FCIDUMP code #1

wants to merge 9 commits into from

Conversation

ajwt
Copy link
Member

@ajwt ajwt commented Dec 19, 2022

Added PBC FCIDUMP code

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
@verena-neufeld
Copy link
Member

verena-neufeld commented Jan 1, 2023

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.

Copy link
Member

@verena-neufeld verena-neufeld left a comment

Choose a reason for hiding this comment

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

some small comments

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
Copy link
Member

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?

Copy link
Member Author

@ajwt ajwt Jan 16, 2023

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.

Copy link
Member Author

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):
Copy link
Member

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...

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
Copy link
Member

Choose a reason for hiding this comment

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

see previous comment

Copy link
Member Author

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
Copy link
Member

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?).

Copy link
Member Author

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):
Copy link
Member

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?

Copy link
Member Author

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.

@verena-neufeld
Copy link
Member

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.

@verena-neufeld
Copy link
Member

I hope this is helpful for now. It was quite a while ago I had looked at this before :D .

verena-neufeld and others added 4 commits January 1, 2023 15:35
- remove need to modify kccsd_rhf.py
Removed outdated comments about get_kconserv
@ajwt
Copy link
Member Author

ajwt commented Jan 17, 2023

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.

Thanks for this edit - it's a lot cleaner for integration. I've merged that branch into this. FCIDUMP Tests still pass.

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.

2 participants