Header Ads Widget

Ab initio Calculations Using Elk Code

Last Posts

10/recent/ticker-posts

Slab calculation of hBN


  • Muhammad Avicenna Naradipa

    Hi All,

    I'm currently calculating optical properties (task 120,121) for monolayer & few layer hexagonal BN, but I can't seem to converge the ground state.

    I tried to run 3x3 slab but apparently this is too demanding for only 40 cores. So I'm only using default parameters, with primcell turned on (so the slab is only 1x1), and ~35 - 40 a.u. of vacuum.

    Unfortunately, even after 600+ iterations the calculation does not converge. TOTENERGY fluctuates around -150 to 150. Broyden mixing helped a bit, but it also does not converge. I used another Broyden mixing parameter and this too got stuck.

    Any suggestions to speed up and converge the calculatiom? Thank you!

    Here's my input file.
    `
    tasks
    1
    120
    121

    xctype
    100 101 130

    ! species files path
    sppath
    '/some directory/'

    !lmaxo
    ! 8
    !
    !gmaxvr
    ! 20.0
    !
    !gmaxrf
    ! 5.0
    !
    !swidth
    ! 0.01

    wplot
    500 100 1 : nwplot, ngkrf, nswplot
    0.0 0.75 : wplot

    intraband
    .true.

    optcomp
    1 1 1
    2 2 1
    3 3 1

    !mixtype
    ! 2

    !broydpm
    ! 0.6 0.01

    stype
    2

    nempty
    10

    maxscl
    600

    nwrite
    10

    ngridk
    6 6 1

    primcell
    .true.

    !!! hBN 3x3x1 monolayer
    avec
    14.19562162 0.000000000 0.000000000
    7.097810813 12.29376895 0.000000000
    0.000000000 0.000000000 40.79451977

    atoms
    2 : nspecies
    'N.in' : spfname
    9 : natoms; atposl, bfcmt below
    0.88888900 0.22222233 0.50000000 0.00000000 0.00000000 0.00000000
    0.88888900 0.55555567 0.50000000 0.00000000 0.00000000 0.00000000
    0.88888900 0.88888900 0.50000000 0.00000000 0.00000000 0.00000000
    0.22222233 0.22222233 0.50000000 0.00000000 0.00000000 0.00000000
    0.22222233 0.55555567 0.50000000 0.00000000 0.00000000 0.00000000
    0.22222233 0.88888900 0.50000000 0.00000000 0.00000000 0.00000000
    0.55555567 0.22222233 0.50000000 0.00000000 0.00000000 0.00000000
    0.55555567 0.55555567 0.50000000 0.00000000 0.00000000 0.00000000
    0.55555567 0.88888900 0.50000000 0.00000000 0.00000000 0.00000000
    'B.in' : spfname
    9 : natoms; atposl, bfcmt below
    0.77777767 0.44444433 0.50000000 0.00000000 0.00000000 0.00000000
    0.77777767 0.77777767 0.50000000 0.00000000 0.00000000 0.00000000
    0.77777767 0.11111100 0.50000000 0.00000000 0.00000000 0.00000000 0.11111100 0.44444433 0.50000000 0.00000000 0.00000000 0.0000000 0.11111100 0.77777767 0.50000000 0.00000000 0.00000000 0.00000000 0.11111100 0.11111100 0.50000000 0.00000000 0.00000000 0.00000000 0.44444433 0.44444433 0.50000000 0.00000000 0.00000000 0.00000000
    0.44444433 0.77777767 0.50000000 0.00000000 0.00000000 0.00000000
    0.44444433 0.11111100 0.50000000 0.00000000 0.00000000 0.00000000

    `

    Best,
    Cenna

     

    • Makhlouf Kharoubi

      Dear Cenna,
      */ Try an SCF calculation (task 0) with fixed energy parameters
      "autolinengy F" and a very small broyden mixing factor
      !!!!!!!!!!!!!!!!
      mixtype
      3

      broydpm
      0.05 0.15
      !!!!!!!!!!!!!
      ** /Restart the calculation (task 1) with "autolinengy T"
      Hope this helps
      Best regards
      Makhlouf

      On Sat, Jun 13, 2020 at 3:08 PM Muhammad Avicenna Naradipa cennanaradipa@users.sourceforge.net wrote:

      Hi All,

      I'm currently calculating optical properties (task 120,121) for monolayer
      & few layer hexagonal BN, but I can't seem to converge the ground state.

      I tried to run 3x3 slab but apparently this is too demanding for only 40
      cores. So I'm only using default parameters, with primcell turned on (so
      the slab is only 1x1), and ~35 - 40 a.u. of vacuum.

      Unfortunately, even after 600+ iterations the calculation does not
      converge. TOTENERGY fluctuates around -150 to 150. Broyden mixing helped a
      bit, but it also does not converge. I used another Broyden mixing parameter
      and this too got stuck.

      Any suggestions to speed up and converge the calculatiom? Thank you!

      Here's my input file.
      `
      tasks
      1
      120
      121

      xctype
      100 101 130

      ! species files path
      sppath
      '/some directory/'

      !lmaxo
      ! 8
      !
      !gmaxvr
      ! 20.0
      !
      !gmaxrf
      ! 5.0
      !
      !swidth
      ! 0.01

      wplot
      500 100 1 : nwplot, ngkrf, nswplot
      0.0 0.75 : wplot

      intraband
      .true.

      optcomp
      1 1 1
      2 2 1
      3 3 1

      !mixtype
      ! 2

      !broydpm
      ! 0.6 0.01

      stype
      2

      nempty
      10

      maxscl
      600

      nwrite
      10

      ngridk
      6 6 1

      primcell
      .true.

      !!! hBN 3x3x1 monolayer
      avec
      14.19562162 0.000000000 0.000000000
      7.097810813 12.29376895 0.000000000
      0.000000000 0.000000000 40.79451977

      atoms
      2 : nspecies
      'N.in' : spfname
      9 : natoms; atposl, bfcmt below
      0.88888900 0.22222233 0.50000000 0.00000000 0.00000000 0.00000000
      0.88888900 0.55555567 0.50000000 0.00000000 0.00000000 0.00000000
      0.88888900 0.88888900 0.50000000 0.00000000 0.00000000 0.00000000
      0.22222233 0.22222233 0.50000000 0.00000000 0.00000000 0.00000000
      0.22222233 0.55555567 0.50000000 0.00000000 0.00000000 0.00000000
      0.22222233 0.88888900 0.50000000 0.00000000 0.00000000 0.00000000
      0.55555567 0.22222233 0.50000000 0.00000000 0.00000000 0.00000000
      0.55555567 0.55555567 0.50000000 0.00000000 0.00000000 0.00000000
      0.55555567 0.88888900 0.50000000 0.00000000 0.00000000 0.00000000
      'B.in' : spfname
      9 : natoms; atposl, bfcmt below
      0.77777767 0.44444433 0.50000000 0.00000000 0.00000000 0.00000000
      0.77777767 0.77777767 0.50000000 0.00000000 0.00000000 0.00000000
      0.77777767 0.11111100 0.50000000 0.00000000 0.00000000 0.00000000
      0.11111100 0.44444433 0.50000000 0.00000000 0.00000000 0.0000000 0.11111100
      0.77777767 0.50000000 0.00000000 0.00000000 0.00000000 0.11111100
      0.11111100 0.50000000 0.00000000 0.00000000 0.00000000 0.44444433
      0.44444433 0.50000000 0.00000000 0.00000000 0.00000000
      0.44444433 0.77777767 0.50000000 0.00000000 0.00000000 0.00000000
      0.44444433 0.11111100 0.50000000 0.00000000 0.00000000 0.00000000

      `

      Best,
      Cenna


      Slab calculation of hBN
      https://sourceforge.net/p/elk/discussion/897820/thread/266e2bd649/?limit=25#9925


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/elk/discussion/897820/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
    • Andrew Shyichuk

      Andrew Shyichuk - 2020-06-27

      Dear Cenna,

      It took me some effort (maybe a hundred runs) and the whole set of "my typical" tricks (which mostly failed), but at the end I've had it covered.
      The zip contains the input files, elk.in in the final. Feel free to play around with the parameters, maybe it can be improved even more.

      Some notes and comments:
      - Increasing broydpm parameters results in a more aggressive mixing, reducing chances of convergence.
      - I've heard somewhere that odd-sized k-point grids are better, but that was for doped systems, not sure if that applies here.
      - I disabled point nuclei by setting ptnucl to false. Density gradients are known to jump at the nuclei (in all-electron codes). It did help at the beginning, to some extent, but finally I went back to point nuclei.
      - Manual control of muffin-tin radii is good, especially with small bond length as here. I set them to 1.25 for B, 1.4 for N (1.3 and 1.3 were fine too, I guess). Also, removed the LO at N, not required with this small RMT.
      - isgkmax = -2 is for manual control of plane wave cutoff, my intuition works better with it.
      - Increased grid sizes: more points in the species, lradstp = 1.
      - Increasing gmaxvr, increasing rgkmax helped a bit, did not solve the problem.
      - Playing around with lmaxi, lmaxo, lmaxapw either did or did not help, sometimes causing huge error in the charge.
      - autolinengy was required here (I guess), as the variable linengy converges to about -0.12, while the fixed one is 0.15.
      - lorbcnd and nxoapwlo =1, 2 did not help. Moreover, nxoapwlo made things worse in some cases.
      - vkloff did not help.
      - The winner was msmooth. With 4, it was a progress, got convergence with 7.
      - Finally, the non-reduced cell is not impossible to run, I've had it running with 20GB RAM, 8 threads, and it was doing a few iterations per hour.

      The winning elk.in:

      !the unlisted parameters are defaults
      
      tasks
      0
      
      xctype
      100 101 130
      
      msmooth
       7
      
      lradstp
       1
      
      nwrite
      10
      
      autolinengy
       t
      
      ngridk
      7 7  1
      
      rgkmax 
       9.0
      
      gmaxvr 
       17
      
      isgkmax
      -2
      
      lmaxi
       2
      
      lmaxo
       6
      
      lmaxapw 
       7
      
      primcell
       t
      
       
    • Muhammad Avicenna Naradipa

      Dear Andrew,

      Thank you very much for you help and advice Andrew! I too tried to tinker with the regular parameters (broydpm, lmaxi, lmaxo, gmaxvr) but the closest I got was with very small k-point grid (4x4x1). This just gave me the 'minimum linearisation energy' error. I did get the 0.15 minimum energy without autolinegy turned on. The optical properties was rubbish though, just 1.000 and 0.000.

      I'll try to use your converged input file and see if I can improve it. Can I ask a few more questions:

      1. For the local orbitals, roughly what's the size of the RMT that is safe for us to remove the local orbitals? Will this improve the convergence for most structures with small bond length?
      2. If I increase lmaxapw we should have a 'better' (i.e. more accurate result), right? Any reason why you've reduced it to 7?
      3. Given that you've changed gmaxvr to 17.0, should I increase gmaxrf as well? Say around 6.0?

      Best,
      Cenna

       

    • Andrew Shyichuk

      Andrew Shyichuk - 2020-06-28

      Dear Cenna,

      "I did get the 0.15 minimum energy without autolinegy turned on. " - 0.15 is the default one and constant, this is expected.
      Bad optics was probably coming from a bad convergence.

      Regarding your questions.
      1. Not sure. I usually search this forum, the matter was heavily discussed back at the day. In principle, the variable linearization energy must be roughly at Fermi level for semicore states, and below it for "less-semicore" states. If it's more than 0.5 Ha above - the LO is probably redundant. Bond length / EOS can be sensitive to LOs. If you get a "typical DFT error" with your basis - it is fine. If you get the same properties (except for total energy) with and without the LO - the LO is probably redundant.
      2. Depends. Larger lmaxapw needs more plane waves, i.e. higher rgkmax, which might lead to instabilities. Too many plane waves (too small lmaxapw for the given rgkmax) is also bad. In this case, the system is badly sensitive to it, so these are kind of "best guess" values. I assume they can be improved. Yet again, try checking if the properties depend on them.
      3. Don't think so. You may try different values and see if the optics changes much with larger gmaxrf values. The system is small, the run time shoud not be tough even with TDDFT.

      Best regards.
      Andrew

       

    • Muhammad Avicenna Naradipa

      Hi Andrew,

      Thanks a lot for your help. I've run 1 layer and 2 layer hBN and they both converge well. Strangely, the 2 layer hBN converges significantly faster (around 30-40%) compared to the 1 layer hBN. Any particular reason for this? I was expecting that it would take longer to calculate knowing that the atoms are twice as much compared to the 1 layer hBN.

      Also, I have been calculating DFT+U on these calculations, but I cannot seem to nudge the optical band gap significantly. Details of this are in another thread (more relevant).

      Best,
      Cenna

     

     https://sourceforge.net/p/elk/discussion/897820/thread/266e2bd649/

    Post a Comment

    0 Comments