CP2K+SIRIUS with dispersion functionals

104 views
Skip to first unread message

Dialogicus

unread,
Sep 2, 2022, 5:02:29 AM9/2/22
to cp2k
Dear CP2K users,

As CP2K manual says it’s possible to use Van der Waals functionals in the plane-wave calculations with SIRIUS.

I tried to run Fm3m gold cell optimization using pseudopotential PW method. VdW interactions were taken into account in VDW_POTENTIAL subsection with NON_LOCAL type of dispersion functional. However, it seems there’s no difference between calculations with and without dispersion correction. I suspect the vdW functionals don’t work in my case.

My CP2K and SIRIUS are both linked with libvdwxc library.

I don’t know what I’m doing wrong. Is any ideas?

My input and output files (with and without vdW correction) are attached below.

Au_Fm3m_opt.inp
Au_Fm3m_opt.out
Au_Fm3m_vdW_opt.out
Au_Fm3m_vdW_opt.inp

Anton Kozhevnikov

unread,
Sep 2, 2022, 5:15:00 AM9/2/22
to cp2k
Dear Dialogicus!
We are looking into the issue and get back to you once it is solved.

With kind regards,
Anton.

Mathieu Taillefumier

unread,
Sep 2, 2022, 9:44:30 AM9/2/22
to cp2k
Hi,

CP2K implementation of vdw is completely independent of libvdwxc which is used in SIRIUS. It means in practice that
  • there is no direct path in place in cp2k to parse the VDW_POTENTIAL section and find the relevant functional supported in libvdwxc (and SIRIUS).It should probably be added if possible.
  • the VDW_POTENTIAL section is simply ignored when SIRIUS is initialized. It means that the calculations are correct but simply ignore the vdw corrections.
  • CP2K documentation is misleading
If you wish to try a vdwxc functional with SIRIUS, then have a look at the functional supported by libvdwxc (https://libvdwxc.gitlab.io/libvdwxc/background.html#van-der-waals-forces) that fit your needs and then add it to the list of functional XC_FUNC_VDWDF, XC_FUNC_VDWDF2, or XC_FUNC_VDWDFCX to the libxc section of your input file.

something like that might actually work.

&XC_FUNCTIONAL
        &GGA_X_PBE_SOL
        &END GGA_X_PBE_SOL
        &GGA_C_PBE_SOL
        &END GGA_C_PBE_SOL
        &FUNC_VDWDF
        &END FUNC_VDWDF
&END XC_FUNCTIONAL

let me know if it works or not.

Best

M.

Dialogicus

unread,
Sep 5, 2022, 4:09:08 AM9/5/22
to cp2k
Thank you for your advice. Unfortunately, it doesn't work. CP2K can't identify FUNC_VDWDF as a keyword or subsection. The out file says


Possible matches for unknown subsection

FUNC_VDWDF

   enum BEEFVDW in section %__ROOT__%FORCE_EVAL%DFT%KG_METHOD%XC%XC_FUNCTIONAL for keyword _SECTION_PARAMETERS_ score:  103
   subsection LDA_C_VWN in section %__ROOT__%FORCE_EVAL%DFT%KG_METHOD%XC%XC_FUNCTIONAL score:  103
   subsection MGGA_C_DLDF in section %__ROOT__%FORCE_EVAL%DFT%KG_METHOD%XC%XC_FUNCTIONAL score:  103
   subsection GGA_C_CCDF in section %__ROOT__%FORCE_EVAL%DFT%KG_METHOD%XC%XC_FUNCTIONAL score:  103
   enum BEEFVDW in section %__ROOT__%FORCE_EVAL%DFT%ENERGY_CORRECTION%XC%XC_FUNCTIONAL for keyword _SECTION_PARAMETERS_ score:  103

 *******************************************************************************
 *   ___                                                                       *
 *  /   \                                                                      *
 * [ABORT]                                                                     *
 *  \___/         unknown subsection FUNC_VDWDF of section XC_FUNCTIONAL       *
 *    |                                                                        *
 *  O/|                                                                        *
 * /| |                                                                        *
 * / \                                               input/input_parsing.F:187 *
 *******************************************************************************


As far as I understand, this error means invalid syntax for CP2K, but not for SIRIUS. So, is there any way to send information about vdW functional directly to SIRIUS run (e.g. SIRIUS includes this functional automatically in each run)?

--
D.

Mathieu Taillefumier

unread,
Sep 5, 2022, 10:47:19 AM9/5/22
to cp...@googlegroups.com
Thanks for the feedback.

It was possible to go around this problem at an early stage of SIRIUS integration to cp2k but it is not possible to do this anymore. I can come up with a solution for the vdw correction but it will require modifying cp2k accordingly. I would suggest you to open an issue on cp2k github site (as feature to have) so I can track this. It should not take long to include this feature to cp2k.For the time being i have no easy solution to give you unless you are willing to add one line of code for testing and recompiling.

As a temporary solution add this (it turns it on permanently)

CALL sirius_add_xc_functional(sctx, "XC_FUNC_VDWDF")

in sirius_interface.f after the line 186 and recompile. Remove the FUNC_VDWXC keyword from the XC section and run it again.

Warning: it is a temporary solution for testing but it will give me time to actually implement the real fix.

Best
M.


--
You received this message because you are subscribed to a topic in the Google Groups "cp2k" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cp2k/abi2t_F_mQ4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cp2k+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/f2c2235c-79f9-48dd-ae85-a90c7c2034c3n%40googlegroups.com.

Mathieu Taillefumier

unread,
Sep 6, 2022, 11:59:20 AM9/6/22
to cp2k
Hi,

The vdw functionaliity supported by SIRIUS can be activated with the option  VDW_FUNCTIONAL FUNC_VDWDF (or one the two others options) that you have to add in the parameters section (c.f. the attached file).  I  picked a different pp file but it does not matter much.
You will need to use the current development version of cp2k though.

If you already use it, then a git pull -r and make .... will be needed. the VDW support in SIRIUS was not on by default previously but you mentioned you compiled SIRIUS with it. 

I would still consider this as experimental. The library seems robust but we never really tested deeply so any comment / problem reporting is welcome.

I also remarked that you are doing some lattice relaxation. If you encounter some odd behavior could you report them here so I can have a look. I would really appreciate to get this information back.

Best

M.
Au_Fm3m_vdW_opt.inp
Reply all
Reply to author
Forward
0 new messages