Skip to content

Conversation

@Awallace3
Copy link
Contributor

@Awallace3 Awallace3 commented Dec 18, 2024

Description

The objective of this PR is to enable external potentials to be used for both SAPT(DFT) and SAPT(HF).

User API & Changelog headlines

  • Enables users to call psi4.energy('sapt(dft)', external_potential=<EXT_POTENTIAL>) and acquire SAPT(HF) and SAPT(DFT) energies in the presence of an external potential.
  • User can also write external potentials as any combination of C, A, and/or B with the dictionary external potential format.

Dev notes & details

  • The present implementation leverages the scf_helper() external_potential logic to generate and re-use the jk-object to obtain the correct SAPT external potential energies; however, this does not re-use the logic of FISAPT's external potential code. Another ongoing implementation of external potentials in SAPT(DFT) can be found on this branch for long term goals of migrating FI-SAPT functionality into SAPT(DFT).
  • This PR depends on PR#3256 for re-using jk-objects and PR#3232 for automatic GRAC shifts. It should be noted that neither of these PR's seem necessary for the proposed changes to work, but rather, this branch started with both of those changes.

Questions

  • Do we require any additional information about the external potential energies for SAPT(HF) and SAPT(DFT) that isn't provided from the scf_helper() route of re-using jk-objects? Most of the logic in FISAPT0 that is neglected is for handling FI-SAPT. While FI-SAPT exernal potential setup calls are abstracted to be used for SAPT(DFT) if desired in the future, SAPT(DFT) implements electrostatic embedding through the ExternalPotential class on the python side.

Checklist

  • Tests added for any new features (see ./tests/pytests/test_saptdft.py with specifically test_sapthf_external_potential() corresponding to the FISAPT0 test located psi4/tests/fsapt-ext/input.dat.
  • All or relevant fraction of full tests run

Status

  • Ready for review
  • Ready for merge

@Awallace3 Awallace3 mentioned this pull request Mar 15, 2025
7 tasks
@JonathonMisiewicz
Copy link
Contributor

If you want tests to pass, you'll need to borrow this line from one of Lori's PRs.

@JonathonMisiewicz
Copy link
Contributor

Also, please go back and actually fix the merge conflict. The .gitignore file alone tells me that needs to be re-checked.

@Awallace3
Copy link
Contributor Author

Also, please go back and actually fix the merge conflict. The .gitignore file alone tells me that needs to be re-checked.

I handled the merge conflict in sapt_proc.py; however, I overlooked the .gitignore conflict. Looking back at this branch from your comment, I realized I never cleaned up fisapt.cc to remove debugging related changes, so I have corrected that as well now.

@JonathonMisiewicz
Copy link
Contributor

SAPT DFT tests aren't passing. Please fix.

@Awallace3
Copy link
Contributor Author

SAPT DFT tests aren't passing. Please fix.

I have updated the tests and added an explicit test for SAPT(HF) == FISAPT0 for the external potential case ABC.

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