qsimulate-open / bagel

Brilliantly Advanced General Electronic-structure Library
GNU General Public License v3.0
96 stars 43 forks source link

XMS-CASPT2 Dyson orbitals #280

Closed humeniuka closed 5 months ago

humeniuka commented 7 months ago

This pull request implements Dyson orbitals in combination with XMS-CASPT2 wavefunctions. The only thing that has to be changed relative to the implementation for CASSCF wavefunctions, is that the CI wavefunctions have to be transformed with the unitary matrix that diagonalizes the effective Hamiltonian. The transformed wavefunctions are saved with the new "save_ref" keyword in the "smith" block.

I verified that the computed Dyson orbitals are correct by comparing with an independent implementation by Tomislav Piteša (used in https://doi.org/10.1021/acs.jctc.1c00396 ). The json inputs and output files of the two implementations are in the attached archive.

Other Changes:

pyrazine.tar.gz

shiozaki commented 7 months ago

We are aware of this PR. I cannot promise when, but when we can we will review the code and have it merged. Before that happens, you will need to sign the copyright assignment agreement.

Important Note: The last commit needs to be reverted. This is bad for a few reasons

  1. BAGEL does not have git as a dependency. People can install BAGEL using release assets on a computer that does not have git
  2. This most likely introduces unnecessary compilation
  3. This changes the layout of the output. Given BAGEL has a large user base, I cannot exclude the possibility that someone has an output parser that relies on the line number.

Generally non-essential changes are discouraged.

shiozaki commented 7 months ago

Besides the code, I am not certain whether this definition of Dyson orbitals is appropriate for XMS-CASPT2. The use of rotated references as an approximate wave function is only valid when dynamic correlation contributions are small - so it feels to me that it's assumed that dynamic correlation is only important for rotation of the wave functions around conical interaction -- and that it is not important for the excitations themselves. I am sure there are some systems where that assumption is valid, but I do not feel that it can be universally assumed.

Also, this is somewhat inconsistent with what's already implemented in BAGEL (e.g., XMS-CASPT2 derivative coupling) which takes into account dynamic correlation contributions in the property.

The only way to assess the points above is to implement genuine XMS-CASPT2 Dyson orbitals.

humeniuka commented 7 months ago

Dyson orbitals are mostly used to estimated photoionization cross sections. The transition dipole matrix element between the Dyson orbital and the continuum orbital with wavevector k is approximated as |<Dyson|r|k>|² ≈ |Dyson|². Neglecting the continuum orbital is a very crude approximation, anyway, so CASSCF-quality Dyson orbitals are probably good enough. However, when the dynamic correlation switches the order of the states, the CASSCF Dyson orbitals are unusable. This is particularly problematic in molecular dynamics simulations where one cannot manually reorder the states for each step. The change of the Dyson orbital due to dynamic correlation (other than reordering of the states) is not so important, if one only cares whether the ionization channel is Koopmans-allowed (|Dyson|²≈1) or forbidden (|Dyson|²≈0).

shiozaki commented 7 months ago

Reflecting on the above, could you replace the wording "XMS-CASPT2 Dyson orbitals" in the documentation with something else to signal that this is computed from rotated reference functions? It is a good practice anyway to be transparent as to what the code is doing -- perhaps you could also expand the "Limitation" section to detail the actual implementation. Thank you. We will get back to this PR hopefully soon.

humeniuka commented 5 months ago

All tests pass except for TEST_OPT/DF_HF_Opt test-bagel.out.txt

shiozaki commented 5 months ago

Copy right assignment signed, merging to master