Skip to content

Conversation

@JonathonMisiewicz
Copy link
Contributor

@JonathonMisiewicz JonathonMisiewicz commented Feb 25, 2023

Description

This PR has TDDFT triplets for LDA and GGA functionals. (Psi does not currently support any TDDFT for meta functionals.) This requires lots of moving parts, so this PR serves as a reference for how they all fit together. For ease of reviewing, I'll have smaller PRs that pull off independent pieces for analysis.

While I'm waiting for reviews, I'll update comments to show exactly how I know these spin-integration formulae are correct, for the benefit of future debuggers.

Closes #2841.

Status

There are four parts that I can split into separate PRs for reviewer convenience. Then I can bring in this PR.

User API & Changelog headlines

  • Triplet TDDFT excitations from RKS are now supported.

Theoretical Analysis

Why were DFT triplets harder than HF triplets? To understand this, we need to understand both the origin of the triplet matrix and the spin properties of the relevant matrix elements.

  1. Starting from the UKS RPA/TDA matrices when Ca = Cb, we can do a similarity transformation to obtain the singlet and triplet RKS matrices. The new basis elements for the singlet block all take the form (i->a α + i->a β) / sqrt(2), while the new basis elements for the triplet block take form (i->a α - i->a β) / sqrt(2).
  2. The electron potential is spin-free. Because the coulomb J and exchange K terms are expectation values of this, the associated integrals are spin free, assuming spin does not integrate to zero. For J, spin only integrates to zeroes if there is a spin mismatch in either the bra or the ket. Because we only consider Sz preserving excitations, no spin mismatches are possible. For K, a bra orbital needs to have the same spin as a ket orbital. Because both bra orbitals have the same spin, and both ket orbitals have the same spin, this requires that all orbitals have the same spin. Meanwhile, the DFT V terms are second derivatives of the DFT energy with respect to orbital rotation generators. These are not spin-free.
  3. Now let's combine the two above facts. After performing the spin-integration in the triplet case, you end up with [(α|α) - (α|β) - (β|α) + (β|β)]. Upon exploiting spin-restriction, this reduces to [(α|α) - (α|β)]. For J, the second term is equal to the first, so the two cancel. For K, the second term is zero, so you have the first integral. For V, the two terms are neither equal nor zero. The V term cannot be neglected, even though it's normally added to the J term, which here is zero.

Dev notes & details

  • V is still bundled with J, but the RSCF products now mark that they may need to get a J-like term. This is no longer equivalent to being singlet or not.
  • Several methods have been modified to have a singlet flag, necessary to pass to compure_Vx whether to compute the singlet or triplet term.
  • HF classes no longer have a potential_ attribute. Individual classes may need to access signatures of the specific subclass they have. Instead, subclasses now have a specific subclass for their potential_ attribute if applicable. An abstract method has been added to the HF base class to get the potential when the subclass doesn't change the method signature.
  • RV::compute_Vx_full now exists alongside RV::compute_Vx. The former needs to exist so we can have a flag to control the spin-integration. The latter needs to exist to not break polymorphism when we don't need that flag.
  • A new function has been created to make a UKS version of an RKS functional.
  • If a triplet is requested, compute_functional will build a UKS functional, compute for that, and cannibalize the pieces to get the properly triplet spin-integrated quantity.
  • Ability to do DAXPBY added.
  • Updated a bad test value.

Checklist

  • test_tdscf_excitations.py passes. All 70 of the tests.

Status

  • Ready for review
  • Ready for merge

@JonathonMisiewicz JonathonMisiewicz added feature Extends an existing Psi feature or develops a new one. dft For issues specific to DFT and their many functionals. labels Feb 25, 2023
@JonathonMisiewicz JonathonMisiewicz added this to the Psi4 1.8 milestone Feb 25, 2023
@JonathonMisiewicz JonathonMisiewicz force-pushed the triplet_tddft branch 2 times, most recently from ff2e614 to cb8fb3b Compare February 26, 2023 01:55
@JonathonMisiewicz JonathonMisiewicz marked this pull request as ready for review February 27, 2023 15:45
@JonathonMisiewicz
Copy link
Contributor Author

Ready for review! I'll want this open for a bit before merging it, to give time for comments.

@JonathonMisiewicz JonathonMisiewicz merged commit 5b06c06 into psi4:master Mar 14, 2023
@JonathonMisiewicz JonathonMisiewicz deleted the triplet_tddft branch March 14, 2023 16:33
@loriab loriab mentioned this pull request Mar 23, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dft For issues specific to DFT and their many functionals. feature Extends an existing Psi feature or develops a new one.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TDDFT Not Triplet Spin-Integrated

3 participants