How to do TD-DFT calculation

Queries about input and output files, running specific calculations, etc.


Moderators: Moderator, Global Moderator

Post Reply
Message
Author
marco_vitek
Newbie
Newbie
Posts: 8
Joined: Thu May 19, 2022 11:43 am

How to do TD-DFT calculation

#1 Post by marco_vitek » Fri Jul 12, 2024 12:47 pm

Dear vasp users,

I've been trying to compute the TD-DFT of my system but I'm confused by the documentation. The documentation is somewhat vague on the topic as it appears to use the term "BSE" somewhat loosely. It seems like I should use ALGO=TDHF, but the matrix of options for LADDER and LHARTREE make it sound like if both are true, then I'm actually computing the BSE solution and not the TD-DFT solution? And actually all of the terms in the matrix of those combinations use GW/BSE language rather than the terms I usually associate with TD-DFT. The documentation for ALGO=TDHF specifically references the Cassida equations, which are for TD-DFT, though. It just seems very back and forth between the two sets of language and it's not clear to me which solution I'm actually calculating for a given set of options.

Can someone clarify what keywords need to be set for a true TD-DFT calculation? "

alexey.tal
Global Moderator
Global Moderator
Posts: 310
Joined: Mon Sep 13, 2021 12:45 pm

Re: How to do TD-DFT calculation

#2 Post by alexey.tal » Fri Jul 12, 2024 2:44 pm

Hi,

We are constantly working on improving our documentation, so thank you for the feedback.
Which page are you referring to? Have you read this page?

The ALGO=TDHF algorithm solves the Casida equation (which is very similar to the Bethe-Salpeter equation) and depending on the exchange-correlation functional and the desired approximation one should set LHARTREE, LADDER, and LFXC flags.

What exchange-correlation functional are you using in your TD-DFT calculation?

marco_vitek
Newbie
Newbie
Posts: 8
Joined: Thu May 19, 2022 11:43 am

Re: How to do TD-DFT calculation

#3 Post by marco_vitek » Wed Jul 17, 2024 10:44 am

I have read that page, but some of the problem is that the documentation seems to use several terms very loosely and interchangeably. I'm going to go through all the documentation and the problems I've had with it in case you want to improve it in the future, but it would really be helpful just to have a list of what keywords need to be set in order to run a range-separated hybrid TD-DFT calculation.

In reference to your page, it says that one should set the appropriate LHARTREE and LADDER keywords, but the documentation for the LHARTREE and LADDER pages includes a useful table of what each combination of the two settings does. And those descriptions of what the two terms do writes that setting both to .TRUE. is equivalent to a "full BSE" calculation and elsewhere says that another combination gives a "random phase approximation". These are both terms I have only heard in the context of a GW-style or BSE-type calculation, not a TD-DFT or TD-HF calculation, which made me wonder if I was inadvertently running a BSE calculation or not.

It only further muddies the water that the algorithm keyword is "TDHF", apparently referencing a time-dependent Hartree-Fock calculation. In the documentation page you list, it includes both a TD-HF calculation and a TD-DFT calculation under the title "Cassida equations". I ended up looking up Cassida as I wasn't familiar with this term, and based on Cassida's own words, he strictly considers his contributions to be to TD-DFT and not TD-HF. To quote, "The importance of [Cassida's seminal article on TD-DFT] is that it explained TD-DFT to ab initio chemists and explained linear response theory to DFT chemists."

I was further confused by looking at the OUTCAR file from some test runs I performed. Eventually, I would like to run a TD-DFT calculation using a range-separated hybrid functional. So we set the AEXX to set the amount of HF exchange in the DFT functional like in a typical hybrid DFT calculation, but in the OUTCAR file, it is invariably changed to 1.00. Unless AEXX has a different meaning in a TD-DFT calculation that isn't documented anywhere I've found, this should indicate a pure HF calculation, meaning that I actually calculated the TD-HF solution and not the TD-DFT solution? And so you can see how it is confusing that "Cassida equations" is used apparently interchangeably between both TD-HF and TD-DFT.

I should also point out that I'm somewhat confused by the LHARTREE and LADDER keywords. They reference bubble and ladder diagrams but I don't know what those are. I don't see any diagrams in the outputs even when both are set to TRUE and googling either "bubble diagrams" or "ladder diagrams" hasn't given me any idea what these are referring to. I feel like I might have seen these before and just not used that exact name, but since google doesn't turn anything up, its really hard to check that. On the other hand, it seems like these diagrams are referring to different levels of approximation in the calculation, but I've never really heard of diagrams being used in calculations so that side is confusing as well.
You do not have the required permissions to view the files attached to this post.

alexey.tal
Global Moderator
Global Moderator
Posts: 310
Joined: Mon Sep 13, 2021 12:45 pm

Re: How to do TD-DFT calculation

#4 Post by alexey.tal » Wed Jul 17, 2024 2:37 pm

Thank you for your detailed answer. Perhaps our documentation of TD-DFT relies too much on the language of Feynman diagrams which is more common in the many-body perturbation theory, but I would say that it is often used in the context TD-DFT as well. In any case, we should definitely work on making it more accessible to people who are not familiar with the many-body perturbation theory.

You can read these papers to better understand the connection between TD-DFT and BSE:
A. Tal, P. Liu, G. Kresse, A. Pasquarello, Phys. Rev. Research 2, 032019 (2020)
G. Onida, L. Reining, A. Rubio, Rev. Mod. Phys. 74, 601-659 (2002)
In reference to your page, it says that one should set the appropriate LHARTREE and LADDER keywords, but the documentation for the LHARTREE and LADDER pages includes a useful table of what each combination of the two settings does. And those descriptions of what the two terms do writes that setting both to .TRUE. is equivalent to a "full BSE" calculation and elsewhere says that another combination gives a "random phase approximation". These are both terms I have only heard in the context of a GW-style or BSE-type calculation, not a TD-DFT or TD-HF calculation, which made me wonder if I was inadvertently running a BSE calculation or not.
I see that it can be confusing. It should rather say full BSE or full TDHF. However, TD-DFT calculation would also imply setting LFXC=.TRUE..
It only further muddies the water that the algorithm keyword is "TDHF", apparently referencing a time-dependent Hartree-Fock calculation. In the documentation page you list, it includes both a TD-HF calculation and a TD-DFT calculation under the title "Cassida equations". I ended up looking up Cassida as I wasn't familiar with this term, and based on Cassida's own words, he strictly considers his contributions to be to TD-DFT and not TD-HF. To quote, "The importance of [Cassida's seminal article on TD-DFT] is that it explained TD-DFT to ab initio chemists and explained linear response theory to DFT chemists."
The difference between TD-DFT and TD-HF is in the terms included in the exchange-correlation potential, i.e., if you include the full exact exchange and neglect the correlation terms in TD-DFT you get TD-HF. In VASP any level of approximation TD-PBE, TD-LDA, TD-DDH, or TD-HF can be used in Casida's approach.
I was further confused by looking at the OUTCAR file from some test runs I performed. Eventually, I would like to run a TD-DFT calculation using a range-separated hybrid functional. So we set the AEXX to set the amount of HF exchange in the DFT functional like in a typical hybrid DFT calculation, but in the OUTCAR file, it is invariably changed to 1.00. Unless AEXX has a different meaning in a TD-DFT calculation that isn't documented anywhere I've found, this should indicate a pure HF calculation, meaning that I actually calculated the TD-HF solution and not the TD-DFT solution? And so you can see how it is confusing that "Cassida equations" is used apparently interchangeably between both TD-HF and TD-DFT.

In the OUTCAR file you should be able to find the line:
parameters for screened Coulomb W: AEXX
where you can see what value of AEXX is used in the TD-DFT calculation.
I should also point out that I'm somewhat confused by the LHARTREE and LADDER keywords. They reference bubble and ladder diagrams but I don't know what those are. I don't see any diagrams in the outputs even when both are set to TRUE and googling either "bubble diagrams" or "ladder diagrams" hasn't given me any idea what these are referring to. I feel like I might have seen these before and just not used that exact name, but since google doesn't turn anything up, its really hard to check that. On the other hand, it seems like these diagrams are referring to different levels of approximation in the calculation, but I've never really heard of diagrams being used in calculations so that side is confusing as well.
If we write the Dyson equation for the polarizability we can see that the interaction is described by two terms: the Coulomb potential and the exchange-correlation kernel: v and fxc. The Coulomb potential is enabled by the tag LHARTREE. The fxc kernel is enabled by two tags LFXC for the local part of the xc potential and LADDER for the non-local part of the xc potential.
pic.png
If you want to perform a TD-DFT calculation with a range-separated hybrid functional you should set the following tags:

Code: Select all

ALGO=TDHF
LADDER=.TRUE.
LHARTREE=.TRUE.
LFXC=.TRUE.
LMODELHF=.TRUE.
AEXX = your value here
HFSCREEN = your value here
And ANTIRES=2 if you would like to go beyond Tamm-Dancoff approximation.
You do not have the required permissions to view the files attached to this post.

Post Reply