Skip to content

Turning off FDDS disp when SAPT_DFT_FUNCTIONAL = HF #3080

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

Merged
merged 2 commits into from
Nov 23, 2023

Conversation

carolinesargent
Copy link
Contributor

Description

The purpose of this PR is to turn off FDDS dispersion when SAPT_DFT_FUNCTIONAL = HF in SAPT(DFT).

SAPT0 uses a HF description of monomers, whereas SAPT(DFT) replaces this description with KS-DFT. When SAPT(DFT)’s functional is set to HF, the results should be equivalent to those of SAPT0. Currently, SAPT(DFT) / SAPT_DFT_FUNCTIONAL HF computes coupled dispersion with FDDS. This step is costly and unnecessary.

User API & Changelog headlines

  • The dispersion energy for SAPT(DFT) with HF will now match SAPT0 and no longer calculate or print Disp2,r or Est. Exch-Disp2,r
  • No change necessary in input files

Dev notes & details

  • Places SAPT(DFT)'s FDDS dispersion into an if statement so that FDDS disp is only computed when the functional is not HF
  • Carries information regarding the functional into the printing code so that the correct dispersion terms are printed out

Questions

  • Question1

Checklist

  • sapt-dft1, sapt-dft2, and sapt-compare all pass; no need for the creation of additional tests

Status

  • Ready for review
  • Ready for merge

@loriab loriab added this to the Psi4 1.9 milestone Nov 20, 2023
Copy link
Member

@loriab loriab left a comment

Choose a reason for hiding this comment

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

Thanks for the shortcut!

@@ -122,8 +122,7 @@ def print_sapt_hf_summary(data, name, short=False, delta_hf=False):
return ret


def print_sapt_dft_summary(data, name, short=False):

def print_sapt_dft_summary(data, name, do_dft=True, short=False):
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
def print_sapt_dft_summary(data, name, do_dft=True, short=False):
def print_sapt_dft_summary(data, name, *, do_dft=True, short=False):

If there are any other changes to be made, I'd add a star here so that callers have to name their arguments and don't risk mixing up do_dft and short.

@@ -266,7 +266,7 @@ def run_sapt_dft(name, **kwargs):

# Call SAPT(DFT)
sapt_jk = wfn_B.jk()
sapt_dft(dimer_wfn, wfn_A, wfn_B, sapt_jk=sapt_jk, data=data, print_header=False, delta_hf=delta_hf)
sapt_dft(dimer_wfn, wfn_A, wfn_B, do_dft=do_dft, sapt_jk=sapt_jk, data=data, print_header=False, delta_hf=delta_hf)
Copy link
Member

Choose a reason for hiding this comment

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

aha, making use of Yi's already established do_dft to identify Hartree–Fock — good strategy.

@loriab loriab added this pull request to the merge queue Nov 23, 2023
Merged via the queue into psi4:master with commit 74a3fa4 Nov 23, 2023
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.

3 participants