cp2k and libxc

695 views
Skip to first unread message

Mathias Schumacher

unread,
Jun 6, 2014, 4:34:34 AM6/6/14
to cp...@googlegroups.com
Dear cp2k developers,

I want to use the libxc supporting version 2.4 of your software to do some calculations.
As far as I know only version 2.0.1 of the libxc library is suitable for usage with cp2k up from version 2.4.

My problem now is that, when I compiled (Intel compiler sets 12.1, 13.1 and 14.0) libxc 2.0.1 before proceeding with the compilation of the cp2k code, quite many of the test cases for the XC-functionals from this library failed, in particular the one for the gga_x_rpw86 functional I need. Since the compilation procedure for libxc is simple, I cannot imagine what could have went wrong. Strangely, the compilation of libxc 2.2.0, which I cannot use in cp2k, works absolutely fine and none of the test cases reports any error.

My questions are: Did you check results of these test cases when you added libxc 2.0.1 to the list of libraries supported in cp2k 2.4 and did you observe similiar problem? Might there be just something wrong with the test cases themselves? Can one therefore ignore these failures?

I asked this question to the libxc developers group, they did not reply yet, but I think this is an interesting issue for the users of cp2k in combination with libxc, especially because the 2.0.1 version is the only one we can use with cp2k.


Thanks in advance,
Mathias

Mathias Schumacher

unread,
Jun 6, 2014, 5:52:55 AM6/6/14
to cp...@googlegroups.com
Update:

Recently, I got a reply from the libxc developers group where they tell me that the test suite included in libxc 2.0.1 is "known to be unreliable".
They also say that the more recent versions are backward compatible, but in particular for libxc 2.2.0 they have moved the Fortran interface to another directory.

According to these "news", is there any problem using e.g. libxc version 2.1 with cp2k or do I still have to use version 2.0.1 as stated on the compilation tutorial web page?

hut...@chem.uzh.ch

unread,
Jun 6, 2014, 6:35:47 AM6/6/14
to cp...@googlegroups.com
Hi

no warranty on the following comment. (try and test!)

You can use the libxc 2.2.0 library with any version of CP2K
version 2.4 or later. Just link the standard library, you don't
(yet) need the new F90 interface.
It might be that the new functionals (implemented after 2.0.1)
are not accessible. If you want to use a new functional you
need to do some small changes to the file xc_libxc.F

regards

Juerg Hutter
--------------------------------------------------------------
Juerg Hutter                         Phone : ++41 44 635 4491
Institut für Chemie C                FAX   : ++41 44 635 6838
Universität Zürich                   E-mail: hut...@chem.uzh.ch
Winterthurerstrasse 190
CH-8057 Zürich, Switzerland
---------------------------------------------------------------

-----cp...@googlegroups.com wrote: -----
To: cp...@googlegroups.com
From: Mathias Schumacher
Sent by: cp...@googlegroups.com
Date: 06/06/2014 11:53AM
Subject: [CP2K:5373] Re: cp2k and libxc
--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns...@googlegroups.com.
To post to this group, send email to cp...@googlegroups.com.
Visit this group at http://groups.google.com/group/cp2k.
For more options, visit https://groups.google.com/d/optout.

Marco

unread,
Jul 2, 2014, 8:21:13 PM7/2/14
to cp...@googlegroups.com
Dear Dr. Hutter and Mathias,

As an update to the previous posts on this thread. I linked the libxc 2.1.0 library to the CP2K-2.5.1 code to try out some of the most recent Minnesota functionals. In the few calculations that I have run so far, everything seems to be working fine. I need to run more tests for validation. As Dr. Hutter mentioned, one needs to make additions to the xc_libxc.F file contained in the src directory in order to use the newest functionals available in the 2.1.0 version of libxc. As one example, I am using the N12-SX Minnesota functional. I added the following two lines at the end of the xc_libxc.F file before re-compiling.

    IF (TRIM(func_name) == 'XC_GGA_X_N12_SX')               get_func_id = 241  !  N12-SX functional of Minnesota
    IF (TRIM(func_name) == 'XC_GGA_C_N12_SX')               get_func_id = 242  !  N12-SX functional of Minnesota

Hopefully I did this correctly. Mathias- if you have tested the libxc 2.1.0 library with CP2K I would be interested if everything has worked out well for your tests.

Best regards,
Marco

hut...@chem.uzh.ch

unread,
Jul 4, 2014, 8:09:23 AM7/4/14
to cp...@googlegroups.com
Hi

I just added libxc v2.1 and v2.2 to the SVN version of cp2k.
Have a look in the INSTALL file and test new functionals carefully!

regards

Juerg
--------------------------------------------------------------
Juerg Hutter                         Phone : ++41 44 635 4491
Institut für Chemie C                FAX   : ++41 44 635 6838
Universität Zürich                   E-mail: hut...@chem.uzh.ch
Winterthurerstrasse 190
CH-8057 Zürich, Switzerland
---------------------------------------------------------------

-----cp...@googlegroups.com wrote: -----
To: cp...@googlegroups.com
From: Marco
Sent by: cp...@googlegroups.com
Date: 07/03/2014 02:21AM
Subject: Re: [CP2K:5493] Re: cp2k and libxc
Reply all
Reply to author
Forward
0 new messages