Menu

Problem of convergency on the total energy

Elk Users
2012-01-12
2017-11-13
  • Samuel_Ponce

    Samuel_Ponce - 2012-01-12

    Dear all,

    I'm trying to compute metallic bulk Calcium using the latest version of ELK (1.4.5) and I ran into the problem that my total energy (and Fermi level) continuously (linearily or worse) decrease while increasing gmaxvr/rgkmax.

    I did change the rmt from 2.2 to 3.0 in the specices file as the distance bewteen atoms is about 7.1 Bohr. I also have similar problem with rmt 2.2. All the rest of the species file is the same as the one given with the elk distribution.

    ! The tasks define what will be done by the code:
    ! 0 - Perform ground-state calculation from scratch
    ! 1 - Restart GS calc. from STATE.OUT file
    ! 20 - Calculate band structure as defined by plot1d
    tasks
    0
    20
    ! Tolerance on convegence of band energies (absolute)
    epsband
     1.e-8
    ! Tolerance on conv. of potential (relative)
    epspot
     1.e-7
    ! Tolerance on conv. of total energy (absolute)
    epsengy
     1.e-8
    ! Use adaptive linear mixing of densities
    ! 1 - Adaptive linear
    ! 2 - Pulay mixing
    mixtype
     2
    ! Exchange-correlation functional to use
    ! LDA (PW92) is 3 (default) (equiv. Abinit ixc 7)
    ! GGA-PBE    is 20          (equiv. Abinit ixc 11)
    ! (see Elk manual for other options)
    xctype
     3
    ! Define lattice vectors (FCC diamond has an
    ! experimental lattice parameter of 3.567 angstrom)
    avec
            0.0 5.2685219 5.2685219
            5.2685219 0.0 5.2685219
            5.2685219 5.2685219 0.0
    ! Define atomic species
    atoms
       1   : nspecies - Number of species
    'Ca.in' : spfname - Name of species file
       1   : natoms; atposl, bfcmt below - Atoms in cell, reduced coord. and mome
    nts
        0.00000000    0.00000000    0.0000000    0.00000000  0.00000000  0.000000
    00
    ! Freeze core states (in abinit PAW, they are frozen)
    frozencr
     .false.
    ! Path to atomic data files
    sppath
      './'
    ! Shift of MP grid
    vkloff
    0.5 0.5 0.5
    ! Metallic options
    stype
     0          : Smearing type 0 - Gaussian
    autoswidth
     .true.
    lradstp
     1       : coarse/fine radial grid ratio
    scale 
    0.9513988
    ngridk 
    8 8 8
    rgkmax 
    8
    gmaxvr 
    12
    nempty 
    7
    lmaxapw 
    8
    lmaxvr 
    7
    lmaxmat 
    6
    lmaxinr 
    2
    

    Here are my results:


    rgkmax | nempty | ngridk | lmaxapw | lmaxvr | lmaxmat | lmaxinr | gmaxvr | scale | totenergy  | Fermi

    6 7 8x8x8 8 7 6 2 8 0.9513988 -678.764986363 0.0947785315617
    6 7 8x8x8 8 7 6 2 9 -678.765416762 0.0967619752607
    6 7 8x8x8 8 7 6 2 10 -678.765590697 0.097589923402
    6 7 8x8x8 8 7 6 2 11 -678.765878782 0.0989992851742
    6 7 8x8x8 8 7 6 2 12 -678.765999474 0.0996039401581
    6 7 8x8x8 8 7 6 2 13 -678.766205369 0.100656374385
    6 7 8x8x8 8 7 6 2 14 -678.766293452 0.101117127885
    6 7 8x8x8 8 7 6 2 15 -678.766448353 0.101932745961
    6 7 8x8x8 8 7 6 2 20 -678.766828629 0.104011031258
    6 7 8x8x8 8 7 6 2 30 -678.767247366 0.106426465494
    7 7 8x8x8 8 7 6 2 9 -678.769329345 0.0997455130589
    8 7 8x8x8 8 7 6 2 10 -678.771073653 0.104912588978
    9 7 8x8x8 8 7 6 2 11 -678.772338475 0.111463934764
    10 7 8x8x8 8 7 6 2 12 -678.773093204 0.116510359966
    11 7 8x8x8 8 7 6 2 13 -678.773794224 0.122101699748
    12 7 8x8x8 8 7 6 2 15 -678.774635742 0.130229402409
    13 7 8x8x8 8 7 6 2 15 -678.775008839 0.134543047995
    14 7 8x8x8 8 7 6 2 17 -678.775492091 0.141215417828
    14 7 10x10x10 8 7 6 2 17 -678.775541706 0.14115739895

    I don't realy know what went wrong?

    Thank you for your helps

    Samuel Poncé

     
  • Markus

    Markus - 2012-01-16

    Hello Samuel,

    that sound like an incomplete basis. This might be associated with the d states of Ca (which are empty for the free atom). For my CaO-BSE-core example I had to add local orbitals for the unoccupied d states, you could try this as well:

     'Ca_lo'                                       : spsymb
     'calcium'                                  : spname
      -20.0000                                  : spzn
       73057.72467                              : spmass
      0.447214E-06    2.2000   40.2509   500    : sprmin, rmt, sprmax, nrmt
       8                                        : spnst
       1   0   1   2.00000    T                 : spn, spl, spk, spocc, spcore
       2   0   1   2.00000    T
       2   1   1   2.00000    F
       2   1   2   4.00000    F
       3   0   1   2.00000    F
       3   1   1   2.00000    F
       3   1   2   4.00000    F
       4   0   1   2.00000    F
       1                                        : apword
      0.1500   0  F                             : apwe0, apwdm, apwve
       0                                        : nlx
       6                                        : 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
       2   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.9708   0  T
       1   3                                    : lorbl, lorbord
      0.1500   0  F                             : lorbe0, lorbdm, lorbve
      0.1500   1  F
     -1.2735   0  T
       2   3                                    : lorbl, lorbord
      0.1500   0  F                             : lorbe0, lorbdm, lorbve
      0.1500   1  F
      0.5000   0  T
    

    Please tell us if this works.

    Regards,
    Markus

     
  • Markus

    Markus - 2012-01-16

    Hi again,

    sorry, I just noticed an error in the core-valence partitioning (I took the file from the example…): The Ca.in should read

     'Ca_lo'                                       : spsymb
     'calcium'                                  : spname
      -20.0000                                  : spzn
       73057.72467                              : spmass
      0.447214E-06    2.2000   40.2509   500    : sprmin, rmt, sprmax, nrmt
       8                                        : spnst
       1   0   1   2.00000    T                 : spn, spl, spk, spocc, spcore
       2   0   1   2.00000    T
       2   1   1   2.00000    T
       2   1   2   4.00000    T
       3   0   1   2.00000    F
       3   1   1   2.00000    F
       3   1   2   4.00000    F
       4   0   1   2.00000    F
       1                                        : apword
      0.1500   0  F                             : apwe0, apwdm, apwve
       0                                        : nlx
       6                                        : 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
       2   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.9708   0  T
       1   3                                    : lorbl, lorbord
      0.1500   0  F                             : lorbe0, lorbdm, lorbve
      0.1500   1  F
     -1.2735   0  T
       2   3                                    : lorbl, lorbord
      0.1500   0  F                             : lorbe0, lorbdm, lorbve
      0.1500   1  F
      0.5000   0  T
    

    Best,
    Markus

     
  • J. K. Dewhurst

    J. K. Dewhurst - 2012-01-17

    Dear Samuel, Markus and Martin

    The convergence of the total energy with respect to gmaxvr is slow because of the Poisson equation solver. This solver based on the method of Weinert  requires that a smooth 'pseudo-charge density' is constructed which has the same multipole moment as the real density. The 'smoothness' of this is governed by the order of a polynomial N which is a function of gmaxvr, and this is the reason for the slow convergence.

    I tried adjusting the the proportionality of N w.r.t. gmaxvr, but the current version (1.4.5) seems to be about the best.

    However, you don't normally have to worry about converging the absolute total energy! Usually, only energy differences matter, and these converge much faster w.r.t. the various parameters.

    (Thanks also to Markus for answering all the forum questions)

    Best wishes,
    Kay.

     
  • Jammi Tadaci

    Jammi Tadaci - 2017-11-13

    Dear ELK Users,

    can you please clarify what exactly means statement: "you don't normally have to worry about converging the absolute total energy! Usually, only energy differences matter, and these converge much faster w.r.t. the various parameters."? Any example, etc.

    thank you in advance
    JT

     
  • mfechner

    mfechner - 2017-11-13

    Dear JT,
    Firstly, this statement is true for all first-principle codes. The main problem is that the convergence of the total energy concerning all truncating parameters for the basis (rgkmax, lmaxapw ...) or sampling parameters for the total energy integration (k-points) is slow. Thus to achieve convergence of the value of total energy in the range of 10^{-6} eV you will need sizeable numerical setting. In contrast energy differences between two physical situations, i.e. an antiferromagnetic and ferromagnetic magnetic configuration, converge fast. Means for small parameters you may achieve already no changes in the difference. Please be aware, that if you have gain convergence for one energy difference, this might not be true for another. Thus if you set your basis to calculate lattice constant (meV range) you might have to increase it to compute magnetocrystalline anisotropy (10^{-6} eV range.)

    best
    Michael

     

Log in to post a comment.