Regression between 1.2.15 and 1.3.2/1.3.15?

2011-07-08
2013-06-11
  • Michael Mehl
    Michael Mehl
    2011-07-08

    Returning to the scene of some past calculations, I've been using elk to look at the phase transition between the B1 (NaCl) and B2 (CsCl) structures of MgO.  This is a rather high pressure transition, so I modified Mg.in and O.in to have smaller muffin-tin radii and a denser radial mesh, specifically

    0.100000E-08    1.4500   50.0000   601    : sprmin, rmt, sprmax, nrmt

    in both cases.

    Back in February I looked at the B1 structure for volumes between 105 and 146 Bohr^3 (The transition is around 125 Bohr^3), using elk-version 1.2.15.  Energies looked pretty good, but there were some small anomalies that may or may not be related to https://sourceforge.net/projects/elk/forums/forum/897822/topic/4547295

    So today I downloaded elk-1.3.15 and started the script that produces the results for the B1 phase.  Things looked good until I got to a volume of 110 Bohr^3.  The code started producing a large number of linearization errors.  I killed it after iteration 107. Looking at the total energy for the first few iterations, I found:

    total energy                :      1248557.53201   
    total energy                :     -5700183.69832   
    total energy                :     -20156594.5807   
    total energy                :     -30481389.7634   
    total energy                :     -42420138.9531

    Compare this to the start of a calculation for V = 109 Bohr^3:

    total energy                :     -279.948011748   
    total energy                :     -272.485461369   
    total energy                :     -277.068972632   
    total energy                :     -275.155180557   
    total energy                :     -278.869427681

    or V = 111 Bohr^3:

    total energy                :     -280.015255801   
    total energy                :     -272.324722596   
    total energy                :     -277.109076550   
    total energy                :     -275.091011725   
    total energy                :     -279.085454602

    both of which converge in 19-21 iterations.

    I went back and checked that version 1.2.15 gave reasonable results for 110 Bohr^3.  It does.  Version 1.3.2, however, has the same problem as 1.3.15.  So something happened between 1.2.15 and 1.3.2 to produce this error.

    To summarize:

    Volume 1.2.15 1.3.2 1.3.15

    109 Converges Converges Converges
    110 Converges Fails Fails
    111 Converges Converges Converges

    64 bit openSuSE version 11.4
    Intel Fortran compiler 11.1 with MKL libraries, reproducible with gfortran and elk-supplied libraries.

    Attached below are the elk.in and modified Mg.in and O.in files for the V = 110 Bohr^3 case.  Hopefully they'll make it possible to figure out what's going on.  If it's something I'm doing, please let me know, and thanks for the help.

    elk.in:

    ! B1 MgO:  PBE GGA
    tasks
      0
    ! You can add notes to the INFO.OUT file using the "notes" block
    notes
     MgO: B1 PBE GGA
    avec
      0.0  0.5  0.5
      0.5  0.0  0.5
      0.5  0.5  0.0
    scale
      7.605904922
    ! this is the relative path to the species files
    sppath
      '/home/mehl/elk/MgO/'
    ! PBE GGA:
    xctype
      20
    rgkmax
     10.0
    gmaxvr
     18.0
    atoms
      2                                   : nspecies
      'Mg.in'                             : spfname
      1                                   : natoms
      0.0  0.0  0.0    0.0  0.0  0.0      : atposl, bfcmt
      'O.in'                             : spfname
      1                                   : natoms
      0.5  0.5  0.5    0.0  0.0  0.0      : atposl, bfcmt
    ngridk
      8  8  8
    vkloff
      0.0  0.0  0.0
    mixtype
      2             ! Pulay (fancy Broyden) mixing
    beta0
      0.05          ! Mixing Start
    epspot          ! Potential convergence criterion.  Default is 1.0E-6
      1.0d-6
    epsengy         ! Energy convergence criterion.  Default is 1.0d-3.
      5.0d-7        ! (1.0d-6 Rydbergs)
    

    Mg.in:

     'Mg'                                       : spsymb
     'magnesium'                                : spname
      -12.0000                                  : spzn
       44305.30461                              : spmass
      0.100000E-08    1.4500   50.0000   601    : sprmin, rmt, sprmax, nrmt
       5                                        : spnst
       1   0   1   2.00000    T                 : spn, spl, spk, spocc, spcore
       2   0   1   2.00000    F
       2   1   1   2.00000    F
       2   1   2   4.00000    F
       3   0   1   2.00000    F
       1                                        : apword
      0.1500   0  F                             : apwe0, apwdm, apwve
       0                                        : nlx
       4                                        : nlorb
       0   2                                    : lorbl, lorbord
      0.1500   0  F                             : lorbe0, lorbdm, lorbve
      0.1500   1  F
       1   2                                    : lorbl, lorbord
      0.1500   0  F                             : lorbe0, lorbdm, lorbve
      0.1500   1  F
       0   3                                    : lorbl, lorbord
      0.1500   0  F                             : lorbe0, lorbdm, lorbve
      0.1500   1  F
     -3.1639   0  T
       1   3                                    : lorbl, lorbord
      0.1500   0  F                             : lorbe0, lorbdm, lorbve
      0.1500   1  F
     -1.9634   0  T
    

    O.in:

     'O'                                        : spsymb
     'oxygen'                                   : spname
      -8.00000                                  : spzn
       29165.12202                              : spmass
      0.100000E-08    1.4500   50.0000   601    : sprmin, rmt, sprmax, nrmt
       4                                        : spnst
       1   0   1   2.00000    T                 : spn, spl, spk, spocc, spcore
       2   0   1   2.00000    F
       2   1   1   2.00000    F
       2   1   2   2.00000    F
       1                                        : apword
      0.1500   0  F                             : apwe0, apwdm, apwve
       0                                        : nlx
       3                                        : nlorb
       0   2                                    : lorbl, lorbord
      0.1500   0  F                             : lorbe0, lorbdm, lorbve
      0.1500   1  F
       1   2                                    : lorbl, lorbord
      0.1500   0  F                             : lorbe0, lorbdm, lorbve
      0.1500   1  F
       0   3                                    : lorbl, lorbord
      0.1500   0  F                             : lorbe0, lorbdm, lorbve
      0.1500   1  F
     -1.1227   0  T
    
     
  • Hi!

    Thanks for the all the careful testing and clear summary.

    In version 1.2.15, the effective potential was cut off for large G-vectors in order to fix this instability, but this inadvertently introduced inaccurate results when using the PBE GGA functional with libxc. So we had to remove this cutting off of the G-vectors, but this causes the problem with the instability again (which is i.m.o. the lesser of the two evils). See https://sourceforge.net/projects/elk/forums/forum/897822/topic/4547295

    All you have to do to fix this is decrease 'rgkmax': around 8.5 should be the most you should have to use in any situation. Also try using Broyden mixing, which is more stable than Pulay. Finally, version 1.3.31 is more stable (and faster) than earlier versions, but should be numerically identical to 1.3.15.

    Regards,
    Kay.

     
  • Update: You can now switch on the feature of 1.2.15 by setting

    trimvg
     .true.
    

    This trims the high G-vector parts of the effective potential and thereby stabilizes those calculations which have large 'rgkmax'

    Cheers,
    Kay.