Skip to content

Nexus: Implementation of GCTA with (spin)-adapted Fermi levels#5029

Merged
jtkrogel merged 13 commits into
QMCPACK:developfrom
aannabe:nxs_gcta
Jun 11, 2024
Merged

Nexus: Implementation of GCTA with (spin)-adapted Fermi levels#5029
jtkrogel merged 13 commits into
QMCPACK:developfrom
aannabe:nxs_gcta

Conversation

@aannabe
Copy link
Copy Markdown
Contributor

@aannabe aannabe commented Jun 4, 2024

Proposed changes

This PR implements the grand-canonical twist averaging using (spin)-adapted Fermi levels [GCTA-(S)AFL] as described in:
https://pubs.acs.org/doi/10.1021/acs.jctc.4c00058

The implementation introduces a new GCTA class, which stores most of the functionality and data in the class instance. To avoid interference with the Qmcpack class, deep-copied attributes of the Qmcpack object are passed into the GCTA instance.

The user-facing keyword is simple: gcta = ... in generate_qmcpack(), which activates GCTA occupations. The gcta keyword supports four possible arguments: ('safl', 'afl', 'nscf', 'scf'). Currently, pwscf code interface has full support. Other codes can be readily supported by introducing functions that can read the eigenvalues and k-point data.

To verify the implementation, I compared the resulting twist occupations to those obtained by the independent workflow used in the above article. The twist occupations of Al and Fe at primitive cells and supercells showed the same GCTA occupations using the old implementation versus the new implementation in Nexus. Also, primitive cell runs of Fe showed the same VMC energy as in the above article.

The tested cases of Al and Fe are both cubic systems. More production tests are needed with non-cubic systems. In general, a drop in twist-averaged energy is expected for dense twist-mesh when compared to the case without the use of gcta keyword.

A Nexus example was added that discusses the case of BCC Fe. If needed, more thorough documentation could be added to Nexus docs. This PR also lacks Nexus tests, which we plan to add in the future. All existing Nexus tests are passing.

What type(s) of changes does this code introduce?

  • New feature

Does this introduce a breaking change?

  • No

What systems has this change been tested on?

Laptop, Perlmutter

Checklist

  • Yes. This PR is up to date with current the current state of 'develop'
  • Documentation and tests will be added in another PR to keep the size managable.

@aannabe aannabe added the nexus label Jun 4, 2024
@aannabe aannabe requested a review from jtkrogel June 4, 2024 20:52
@aannabe
Copy link
Copy Markdown
Contributor Author

aannabe commented Jun 5, 2024

I should mention that the spin-collinear case is hard-coded in the current implementation. Support for spinors is possible with gcta = afl, but it requires some further modifications in the Qmcpack class, which I tried to minimize in this PR. For now, I added a check that would throw an error if spinor input is requested.

@jtkrogel
Copy link
Copy Markdown
Contributor

jtkrogel commented Jun 7, 2024

I will review this later today.

Copy link
Copy Markdown
Contributor

@jtkrogel jtkrogel left a comment

Choose a reason for hiding this comment

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

This looks solid. Bonus points for the tutorial-length example!

Just change the couple of "==None" to "is None" and I will approve.

Comment thread nexus/lib/qmcpack.py Outdated
Comment thread nexus/lib/qmcpack.py Outdated
Comment thread nexus/lib/qmcpack.py Outdated
Copy link
Copy Markdown
Contributor

@jtkrogel jtkrogel left a comment

Choose a reason for hiding this comment

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

LGTM.

@jtkrogel jtkrogel enabled auto-merge June 10, 2024 13:52
@prckent
Copy link
Copy Markdown
Contributor

prckent commented Jun 10, 2024

Test this please

@prckent
Copy link
Copy Markdown
Contributor

prckent commented Jun 10, 2024

Test this please

@jtkrogel jtkrogel merged commit ff98e61 into QMCPACK:develop Jun 11, 2024
@aannabe aannabe deleted the nxs_gcta branch June 11, 2024 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants