meta-GGA via libxc in abinit

Total energy, geometry optimization, DFT+U, spin....

Moderator: bguster

Locked
EBIsaacs
Posts: 7
Joined: Tue Nov 22, 2016 8:28 pm
Location: Malibu, CA
Contact:

meta-GGA via libxc in abinit

Post by EBIsaacs » Wed Dec 07, 2016 9:44 pm

Hi all,

Short version: Is it possible to use meta-GGAs in abinit via libxc for forces and total energies?

Longer version:

I'm interested in using abinit to run meta-GGA calculations (e.g. TPSS and SCAN functionals) via libxc. I did the following:

  1. Compiled the latest version of libxc (rev12537).
  2. Compiled abinit-7.10.5 with this libxc. To get this to compile, I modified ~abinit/config/m4/conn-dft.m4 to circumvent the libxc version check. Additionally, I made a few small changes to ~abinit/src/41_xc_lowlevel/m_libxc_functionals.F90 that were causing compilation errors (presumably related to changes in libxc since version 2).
  3. Performed some calculations on bulk fcc aluminum using PBE (ixc=11 or ixc=-101130), TPSS (ixc=-202231), and SCAN (ixc=-263267). For testing, I am just using a norm-conserving (Troullier-Martins) FHI PBE pseudopotential.

I am finding strange results for the relaxed lattice parameter for the meta-GGAs. For example, when I relax with SCAN I get a quite low value of lattice parameter (3.801 A), whereas by doing several static runs varying the lattice parameter, I find the minimum at 4.038 A. I find the relaxation result is unchanged when I ramp up the convergence parameters, vary the initial coordinates, or use another pseudopotential. With TPSS I also find a similar discrepancy, whereas for PBE things seem fine and agree with the literature (4.046 A).

Therefore, I am wondering if something is missing to be able to run libxc meta-GGA calculations in abinit, or if there is some other error I am making?

The main parameters I am using are: ngkpt 25 25 25, ecut 600 eV, usekden 1, ionmov 2, optcell 1, ecutsm 0.5, tolmxf 1.0d-8, dilatmx 1.8, occopt 6, tsmear 0.2 eV. I am running on a linux cluster using Intel compilers, MPI, and FFTW3. The output and log files for the SCAN relaxation are attached.

Thanks very much,
Eric Isaacs
Northwestern University
Attachments
abinit.out
Output file
(80.41 KiB) Downloaded 472 times
abinit.log
Log file
(242.12 KiB) Downloaded 409 times

ebousquet
Posts: 469
Joined: Tue Apr 19, 2011 11:13 am
Location: University of Liege, Belgium

Re: meta-GGA via libxc in abinit

Post by ebousquet » Thu Dec 15, 2016 8:10 pm

Dear Eric,
Indeed, this looks weird. Which version of libxc does it correspond? What did you change in the routines?
Be also aware of the following post: http://forum.abinit.org/viewtopic.php?f=3&t=3385&p=10448#p10448
This effect might also comes from convergence problem (ecut) and related to dilatmx and ecusm flags that are going to adapt/smear the number of plane waves when relaxing while when you compute single point energies at fixed volume the number of plane wave/fft grid will change such as if you are not converged enough with ecut you'll not find consistency between the two methods.
What did you use as tolmxf (and potentially strfact)?
All the best,
Eric

EBIsaacs
Posts: 7
Joined: Tue Nov 22, 2016 8:28 pm
Location: Malibu, CA
Contact:

Re: meta-GGA via libxc in abinit

Post by EBIsaacs » Fri Dec 16, 2016 8:09 pm

Eric:

Thanks very much for the reply.

Since the SCAN functional was implemented recently, I am using the developer's version of libxc. I understand this is ahead of the recommended version (2.0), but according to one of the libxc developers the API has not significantly changed since this version.

To avoid some compilation errors I was experiencing, in ~abinit/src/41_xc_lowlevel/m_libxc_functionals.F90 I commented out the call to xc_f90_lda_c_xalpha_set_par. I also commented out the section with the call to xc_f90_mgga_x_tb09_set_par. These appear to set parameters for Slater's Xalpha method and the Tran-Blaha functional, which I am not interested in for my testing.

I also changed 'xc_f90_info_refs(funcs(ii)%info,jj,str,message)' to 'xc_f90_info_refs(funcs(ii)%info,jj,message)' in libxc_functionals_init.

I was not aware of the strfact variable, so this must have been default (100 Bohr^2). However, when I made ecut 900 eV, tolmxf 1.0d-9, and toldfe 1.0d-7 eV, I still got the same answer and the stresses are well converged (around 1E-7 GPa or less). I have played around with the ecutsm and dilatmx parameters, but the answer is unchanged.

Thanks again,
Eric

ebousquet
Posts: 469
Joined: Tue Apr 19, 2011 11:13 am
Location: University of Liege, Belgium

Re: meta-GGA via libxc in abinit

Post by ebousquet » Mon Dec 19, 2016 12:34 pm

Hi Eric,
Hummm this looks strange indeed.
strfact might be in play here, but to check whether this comes from the MetaGGA or not, can you run the same calculation quickly but with a normal GGA (PBE, still with libxc)?
All the best,
Eric

EBIsaacs
Posts: 7
Joined: Tue Nov 22, 2016 8:28 pm
Location: Malibu, CA
Contact:

Re: meta-GGA via libxc in abinit

Post by EBIsaacs » Mon Dec 19, 2016 11:51 pm

Hi Eric,

Thanks again for these suggestions.

I changed strfact from 100 to 200 Bohr^2 in the SCAN relaxation and I get the same answer. Additionally, I tried relaxing using the libxc PBE (ixc = -101130) and I get the same result as with the built-in PBE (ixc = 11).

Eric

ebousquet
Posts: 469
Joined: Tue Apr 19, 2011 11:13 am
Location: University of Liege, Belgium

Re: meta-GGA via libxc in abinit

Post by ebousquet » Fri Dec 23, 2016 4:55 pm

Hi Eric,
That's strange, can you send me your input file in case I see something wrong and to play with it?
Thanks,
Eric

EBIsaacs
Posts: 7
Joined: Tue Nov 22, 2016 8:28 pm
Location: Malibu, CA
Contact:

Re: meta-GGA via libxc in abinit

Post by EBIsaacs » Fri Dec 23, 2016 5:34 pm

Sure, much appreciated. My input files are attached here.
Eric
Attachments
abinit.in
Input file
(602 Bytes) Downloaded 480 times
13-Al.GGA.fhi.in
Pseudopotential file (added .in to allow upload)
(132.15 KiB) Downloaded 451 times

ebousquet
Posts: 469
Joined: Tue Apr 19, 2011 11:13 am
Location: University of Liege, Belgium

Re: meta-GGA via libxc in abinit

Post by ebousquet » Fri Jan 13, 2017 12:46 pm

Hi Eric,
I went through your problem and on my side I find the same cell parameter if I relay or if I do single point energies.
I did it with PBE and the norm conserving pseudopotential coming from the Abinit table (ONCVPSP generator/pseudo-dojo), so I don't know what is wrong in your calculations.
The main comment I will have is that you used a too large dilatmx, please re-read the documentation regarding this flag. In my run I used dilatmx=1.1.

Here is my input adapted from yours for single point energy:

Code: Select all

#ionmov     2
#optcell    1
ecutsm     0.5
#ntime      30
#tolmxf     1.0d-8
#dilatmx    1.1
enunit     1
ndtset 5
acell:      0.95 0.95 0.95 angstrom
acell+      0.025 0.025 0.025 angstrom
rprim      0.000000  2.0025  2.0025
           2.0025  0.000000  2.0025
           2.0025  2.0025  0.000000
ntypat     1
znucl      13
natom      1
typat      1
xred       0.0 0.0 0.0
ixc        11
#usekden    1
nsppol     1
occopt     6
tsmear     0.2 eV
ecut       800 eV
nstep      50
toldfe     1.0d-10 eV
nband      6
ngkpt      25 25 25
shiftk     0 0 0
prtden     0
prtwf      0
prtelf     0
prtkden    0
prteig     0


Removing the multidaset and uncomenting the commented flags is my input for automatic relaxation.

I let you play around with these new informations, let me know what you get on your side with your pseudo.

All the best,
Eric

EBIsaacs
Posts: 7
Joined: Tue Nov 22, 2016 8:28 pm
Location: Malibu, CA
Contact:

Re: meta-GGA via libxc in abinit

Post by EBIsaacs » Wed Jan 25, 2017 9:14 pm

Hello Eric,

Thanks for taking a look at this.

Just to clarify, with PBE I have no disagreement between the structure from relaxation and that from static runs. This is true for the two pseudopotentials I tried previously, as well as the one you used (Al.psp8). It is only meta-GGA that is giving me trouble.

I could not try meta-GGA with your pseudopotential since the nonlinear core correction are not currently supported for that. However, I tried a few things:

(1) I used your input parameters to redo my calculations. Here I find the same result (e.g., lattice parameter of 3.801 A with the SCAN relaxation).

(2) Previously I was using dilatmx of 1.2 and got the same results, so I had cranked it up to 1.8 (I agree this is too large in general). Anyway, I redid the calculations with dilatmx 1.1 and this does not resolve the discrepancy. For the SCAN relaxation I get a lattice parameter of 3.800 A.

Thanks,
Eric

ebousquet
Posts: 469
Joined: Tue Apr 19, 2011 11:13 am
Location: University of Liege, Belgium

Re: meta-GGA via libxc in abinit

Post by ebousquet » Thu Jan 26, 2017 12:24 pm

Hi Eric,
Sorry for the misunderstanding, I though PBE was not working too!
OK, then this sounds indeed a Meta-GGA specific problem and I'm less specialist of it. Let me warn some more specific guys who can have a look on that!
All the best,
Eric

EBIsaacs
Posts: 7
Joined: Tue Nov 22, 2016 8:28 pm
Location: Malibu, CA
Contact:

Re: meta-GGA via libxc in abinit

Post by EBIsaacs » Thu Jan 26, 2017 6:32 pm

No problem. Sounds good -- will look forward to hearing back.
Thanks,
Eric

ebousquet
Posts: 469
Joined: Tue Apr 19, 2011 11:13 am
Location: University of Liege, Belgium

Re: meta-GGA via libxc in abinit

Post by ebousquet » Thu Jan 26, 2017 8:48 pm

Hi Eric,
Unfortunately, the stress has not been implemented for metaGGA, so you have to do it from the Energy vs Volume curve.
Sounds to be the same in several other codes, no stress implemented for metaGGA...
All the best,
Eric

EBIsaacs
Posts: 7
Joined: Tue Nov 22, 2016 8:28 pm
Location: Malibu, CA
Contact:

Re: meta-GGA via libxc in abinit

Post by EBIsaacs » Fri Jan 27, 2017 5:09 pm

That would explain it! Sorry to hear that, but thanks very much for all your help.

Best,
Eric

Locked