Printing of DFT-D4 Information

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


Moderators: Global Moderator, Moderator

Locked
Message
Author
patrickmelix
Newbie
Newbie
Posts: 3
Joined: Fri Nov 15, 2019 7:23 am

Printing of DFT-D4 Information

#1 Post by patrickmelix » Wed Mar 22, 2023 9:15 am

Dear Developers,

After using the newly available interface to the D4 code, I noticed that no information about the dispersion correction is printed to the OUTCAR nor vasprun.xml. For the internal D3 routines, this is done by default. By adding the following lines in the source code, I can verify that the API to D4 is working correctly:

vdwforcefield.F line 439 (VASP 6.4.0=

Code: Select all

               if (IO%IU6.ge.0) then
                 WRITE(IO%IU6,'(/'' ---------------------------------------------------------------------------------------------''/)')
                 write(IO%IU6,'(A)')'         DFTD4        '
                 write(IO%IU6,'('' Edisp (eV)'',f11.5)')vdw%energy
                 WRITE(IO%IU6,'(/'' ---------------------------------------------------------------------------------------------''/)')
               endif
I checked the D4 API, as it seems that the output stream is passed to it. But with my limited coding skills, I was not able to find any option or flag that could be set to enable any sort of information printing.

So my question is: Is there an option I can set to achieve similar printing behaviour for D4 as for the D3 routines? Did I miss any compilation flags that would enable printing? If not, would it be possible to add similar printing routines in a future version, so that one can get the dispersion information?

Thank you very much for your support!
Best regards,
Patrick

martin.schlipf
Global Moderator
Global Moderator
Posts: 542
Joined: Fri Nov 08, 2019 7:18 am

Re: Printing of DFT-D4 Information

#2 Post by martin.schlipf » Mon Mar 27, 2023 6:22 pm

Thank you for the suggestion. I can implement a similar output for D4 as for D3. Would you mind to create a small example so that I can understand better what exactly what you are looking for? Ideally I would like to see a set of input files and then which part of the OUTCAR for D3 is missing in the D4 calculation.

Martin Schlipf
VASP developer


patrickmelix
Newbie
Newbie
Posts: 3
Joined: Fri Nov 15, 2019 7:23 am

Re: Printing of DFT-D4 Information

#3 Post by patrickmelix » Wed Apr 05, 2023 1:58 pm

Dear Martin,

Thanks for your response, that would indeed be great!

I've created a simple single-point job, once with IVDW=12 (D3BJ) and once with IVDW=13 (D4). In the former case, the output has a section:

Code: Select all


 ---------------------------------------------------------------------------------------------

         DFTD3 V3.0 Rev 1        
 IVDW         = 12
 DF pbe       
 parameters
 VDW_S6       =    1.0000
 VDW_S8       =    0.7875
 VDW_A1       =    0.4289
 VDW_A2       =    4.4407
 k1-k3        =   16.0000    1.3333   -4.0000
 VDW_RADIUS   =   50.2022 A
 VDW_CNRADIUS =   21.1671 A
 Edisp (eV)   -2.62447

 E6    (eV) :    -1.4450
 E8    (eV) :    -1.1794
 % E8        : 44.94
Just before the line

Code: Select all

    FORVDW:  cpu time      0.0180: real time      0.0336
Times and values of course depend on the job, but the general layout is always the same for me.

Looking at the code and the above, I would suggest to print the same things as D3 does and add these items that are hard coded in subdftd4.F but not mentioned elsewhere:

Code: Select all

      options%lmbd        = 3          ! Axilrod-Teller-Muto term
      options%refq        = 5          ! EEQ charge model
      options%wf          = 6.0_q      ! Gaussian weighting factor
      options%g_a         = 3.0_q      ! charge scaling factor height
      options%g_c         = 2.0_q      ! charge scaling factor steepness
I tried to find a way to access the version of the D4 engine, but my Fortran is not good enough it seems. However, it would be a very important information to print the D4 engine version so one can check against known bugs...

The E6 and E8 contributions to the dispersion energy in D3 are also available in D4, but from what I understand in the code only the total dispersion energy is carried over from the D4-API. If you can, it would be of course great to see the E6, E8 and E9 energies here too... But not sure if that would require a lot of changes in the current implementation (it seems VASP is using an older API version currently?!).

Thank you so much for your efforts! If there are any more questions I can help with please let me know.
Best regards,
Patrick

martin.schlipf
Global Moderator
Global Moderator
Posts: 542
Joined: Fri Nov 08, 2019 7:18 am

Re: Printing of DFT-D4 Information

#4 Post by martin.schlipf » Wed Apr 05, 2023 3:34 pm

Thanks for providing this example. I will run a calculation and make sure that the relevant information is reported.

Regarding the API, the interface was developed for DFT-D4 2.3.2. Unfortunately, we always need feedback from the developers or the users to learn if something changed, because we do not monitor external packages for conflicts resulting from changes on their end.

Martin Schlipf
VASP developer


patrickmelix
Newbie
Newbie
Posts: 3
Joined: Fri Nov 15, 2019 7:23 am

Re: Printing of DFT-D4 Information

#5 Post by patrickmelix » Thu Apr 06, 2023 8:32 am

Thanks a lot!

I understand. The update of the API seems to be quite extensive and there's a legacy wrapper just for VASP in the new version as far as I can see. So perhaps the D4 developers would also be willing to help with migrating to the new API, as it also will reduce maintenance effort for them. Also, the new API seems to offer more access to information from a quick look. Perhaps a good wish-list item for the next VASP version :-)

Thanks anyhow for your work, I greatly appreciate it!
Best,
Patrick

Locked