3
$\begingroup$

I am performing calculations using QE and I'm having continuous errors with bfgs. I would like to inquire about this as I don't know how to resolve it.

After receiving structures using the API from Materials Project, some materials are not converging when I try to calculate them.

In my calculations, BFGS continues to oscillate and appears far from convergence. Therefore, increasing BFGS steps (electron_maxstep) or SCF cycles (nstep) seems meaningless. Moreover, looking at the structure in the attached photo below, where BFGS steps no longer increase and only SCF cycles increase, it seems that structural changes during optimization are affecting SCF convergence.

  • decreasing mixing_beta doesn't help in some structures

I will write my input options below. Also, I will attach my output data. (Since there was a comment to write down the output instead of the picture, I wrote two examples of the output below.)

Thanks Input; Co3O6 mp-550206

 &CONTROL calculation = 'vc-relax', prefix = 'Co3O6_mp-550206', restart_mode='from_scratch', pseudo_dir='~/PSlibrary', outdir = 'out_Co3O6_mp-550206', ! dipfield = .TRUE. ! tefield = .TRUE. verbosity = 'high' ! wf_collect = .TRUE. disk_io = 'minimal' nstep = 150 / &SYSTEM ibrav = 0, nat = 9, ntyp = 2, nbnd = 61, ecutwfc = 60.0, ecutrho = 445.0, ! nosym = .TRUE. ! noncolin = .TRUE. ! lspinorb = .TRUE. nspin = 2, occupations = 'smearing', smearing = 'gaussian', ! smearing = 'marzari-vanderbilt', starting_magnetization(1) = 0.058824, starting_magnetization(2) = 0.166667, degauss = 0.0037, ! edir = 3, ! emaxpos = 0.6113, ! eopreg = 0.05183, ! eamp = 0, / &ELECTRONS ! mixing_beta = 0.3 ! mixing_mode = 'plain' ! diagonalization = 'cg' ! conv_thr = 1.0D-10 electron_maxstep = 150 ! scf_must_converge = .TRUE. / &IONS ion_dynamics = 'bfgs' upscale = 100 / &CELL cell_dynamics = 'bfgs' cell_factor = 2 press_conv_thr = 0.2 / ATOMIC_SPECIES Co 58.9332 Co.pbe-spn-kjpaw_psl.0.3.1.UPF O 15.9994 O.pbe-n-kjpaw_psl.1.0.0.UPF K_POINTS {automatic} 18 18 2 0 0 0 CELL_PARAMETERS {bohr} 5.251110620209940 0.000000000000000 0.000000000000000 -2.625555310104970 4.547595195184070 0.000000000000000 0.000000000000000 0.000000000000010 47.325464614639984 ATOMIC_POSITIONS {crystal} Co 0.0000000000 0.0000000000 0.5000000000 Co 0.6666670000 0.3333330000 0.8333330000 Co 0.3333330000 0.6666670000 0.1666670000 O 0.3333330000 0.6666670000 0.7959590000 O 0.3333330000 0.6666670000 0.5373740000 O 0.0000000000 0.0000000000 0.1292920000 O 0.0000000000 0.0000000000 0.8707080000 O 0.6666670000 0.3333330000 0.4626260000 O 0.6666670000 0.3333330000 0.2040410000 

Output (SCF: 149 / BFGS: 49)

 The SCF correction term to forces atom 1 type 1 force = -0.00000000 0.00000000 -0.00000000 atom 2 type 1 force = 0.00000000 -0.00000000 0.00015103 atom 3 type 1 force = -0.00000000 0.00000000 -0.00015103 atom 4 type 2 force = 0.00000000 -0.00000000 0.00006986 atom 5 type 2 force = -0.00000000 0.00000000 0.00003456 atom 6 type 2 force = -0.00000000 0.00000000 0.00000488 atom 7 type 2 force = 0.00000000 -0.00000000 -0.00000488 atom 8 type 2 force = 0.00000000 -0.00000000 -0.00003456 atom 9 type 2 force = -0.00000000 0.00000000 -0.00006986 Total force = 0.011139 Total SCF correction = 0.000240 Computing stress (Cartesian axis) and pressure total stress (Ry/bohr**3) (kbar) P= -5.22 -0.00003965 -0.00000000 0.00000000 -5.83 -0.00 0.00 -0.00000000 -0.00003965 0.00000000 -0.00 -5.83 0.00 0.00000000 0.00000000 -0.00002722 0.00 0.00 -4.00 kinetic stress (kbar) 40471.48 0.00 -0.00 0.00 40471.48 -0.00 -0.00 -0.00 41173.64 local stress (kbar)-173175.79 -0.00 0.00 -0.00-173175.79 -0.00 0.00 -0.00 138702.92 nonloc. stress (kbar) 13412.45 0.00 -0.00 0.00 13412.45 -0.00 -0.00 -0.00 13413.89 hartree stress (kbar) 88267.15 -0.00 -0.00 -0.00 88267.15 0.00 -0.00 0.00 -54574.70 exc-cor stress (kbar) -6754.23 -0.00 -0.00 -0.00 -6754.23 0.00 -0.00 0.00 -6784.20 corecor stress (kbar) -916.53 0.00 0.00 0.00 -916.53 -0.00 0.00 -0.00 -918.45 ewald stress (kbar) 38689.64 0.00 -0.00 0.00 38689.64 0.00 -0.00 0.00-131017.09 hubbard stress (kbar) 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 DFT-D stress (kbar) 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 XDM stress (kbar) 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 dft-nl stress (kbar) 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 TS-vdW stress (kbar) 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 MDB stress (kbar) 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 3D-RISM stress (kbar) 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 Energy error = 3.9E-03 Ry Gradient error = 4.6E-03 Ry/Bohr Cell gradient error = 5.8E+00 kbar number of scf cycles = 149 number of bfgs steps = 49 enthalpy old = -1379.8739257668 Ry enthalpy new = -1379.8699852338 Ry CASE: enthalpy _new > enthalpy _old new trust radius = 0.0004662674 bohr new conv_thr = 0.0000000406 Ry new unit-cell volume = 826.67872 a.u.^3 ( 122.50115 Ang^3 ) density = 3.69783 g/cm^3 CELL_PARAMETERS (bohr) 5.325951343 -0.000000000 0.000000000 -2.662975671 4.612409162 -0.000000000 0.000000000 0.000000000 33.652066423 ATOMIC_POSITIONS (crystal) Co -0.0000000000 -0.0000000000 0.5000000000 Co 0.6666670000 0.3333330000 0.8339352579 Co 0.3333330000 0.6666670000 0.1660647421 O 0.3333330000 0.6666670000 0.7820244675 O 0.3333330000 0.6666670000 0.5519564896 O 0.0000000000 0.0000000000 0.1141519020 O -0.0000000000 -0.0000000000 0.8858480980 O 0.6666670000 0.3333330000 0.4480435104 O 0.6666670000 0.3333330000 0.2179755325 

Output (SCF: 150 / BFGS: 49)

 The SCF correction term to forces atom 1 type 1 force = -0.00000000 -0.00000000 -0.00000000 atom 2 type 1 force = -0.00000000 0.00000000 0.00023539 atom 3 type 1 force = 0.00000000 -0.00000000 -0.00023539 atom 4 type 2 force = 0.00000000 -0.00000000 0.00021452 atom 5 type 2 force = -0.00000000 0.00000000 0.00020460 atom 6 type 2 force = 0.00000000 -0.00000000 0.00000921 atom 7 type 2 force = -0.00000000 0.00000000 -0.00000921 atom 8 type 2 force = 0.00000000 -0.00000000 -0.00020460 atom 9 type 2 force = -0.00000000 0.00000000 -0.00021452 Total force = 0.010636 Total SCF correction = 0.000535 Computing stress (Cartesian axis) and pressure total stress (Ry/bohr**3) (kbar) P= -9.94 -0.00008448 -0.00000000 0.00000000 -12.43 -0.00 0.00 -0.00000000 -0.00008448 0.00000000 -0.00 -12.43 0.00 0.00000000 0.00000000 -0.00003379 0.00 0.00 -4.97 kinetic stress (kbar) 40307.11 0.00 -0.00 0.00 40307.11 -0.00 -0.00 -0.00 41021.83 local stress (kbar)-172292.36 -0.00 0.00 -0.00-172292.36 -0.00 0.00 -0.00 137812.83 nonloc. stress (kbar) 13364.32 0.00 -0.00 0.00 13364.32 -0.00 -0.00 -0.00 13365.81 hartree stress (kbar) 87819.70 -0.00 -0.00 -0.00 87819.70 0.00 -0.00 0.00 -54204.17 exc-cor stress (kbar) -6728.04 -0.00 -0.00 -0.00 -6728.04 0.00 -0.00 0.00 -6758.06 corecor stress (kbar) -913.06 -0.00 0.00 -0.00 -913.06 -0.00 0.00 -0.00 -915.02 ewald stress (kbar) 38429.91 0.00 -0.00 0.00 38429.91 0.00 -0.00 0.00-130328.18 hubbard stress (kbar) 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 DFT-D stress (kbar) 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 XDM stress (kbar) 0.00 0.00 0.00 0.00 0.00 0.00 dft-nl stress (kbar) 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 TS-vdW stress (kbar) 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 MDB stress (kbar) 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 3D-RISM stress (kbar) 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 Energy error = 4.2E-03 Ry Gradient error = 4.9E-03 Ry/Bohr Cell gradient error = 1.2E+01 kbar number of scf cycles = 150 number of bfgs steps = 49 enthalpy old = -1379.8739257668 Ry enthalpy new = -1379.8697551776 Ry CASE: enthalpy _new > enthalpy _old new trust radius = 0.0000007983 bohr trust_radius < trust_radius_min resetting bfgs history The maximum number of steps has been reached. End of BFGS Geometry Optimization new unit-cell volume = 823.59033 a.u.^3 ( 122.04350 Ang^3 ) density = 3.71170 g/cm^3 CELL_PARAMETERS (bohr) 5.315815426 -0.000000000 0.000000000 -2.657907713 4.603631201 -0.000000000 0.000000000 0.000000000 33.654320034 ATOMIC_POSITIONS (crystal) Co -0.0000000000 -0.0000000000 0.5000000000 Co 0.6666670000 0.3333330000 0.8339388830 Co 0.3333330000 0.6666670000 0.1660611170 O 0.3333330000 0.6666670000 0.7819095056 O 0.3333330000 0.6666670000 0.5520565810 O 0.0000000000 0.0000000000 0.1140362337 O -0.0000000000 -0.0000000000 0.8859637663 O 0.6666670000 0.3333330000 0.4479434190 O 0.6666670000 0.3333330000 0.2180904944 
$\endgroup$
3
  • $\begingroup$ +1 and welcome to our new community! Thank you for contributing your question here and we hope to see much more of you in the future!!! Please copy and paste your outputs instead of posting screenshots (I have removed your screenshots because we don't allow users to preset text via image files when it's so easy to just copy and paste the text from the terminal). $\endgroup$ Commented Mar 30 at 11:09
  • $\begingroup$ How is the convergence trend? Are the Energy error and the Gradient error decreasing over consecutive steps? If yes, then you can increase nstep maybe to reach your etot_conv_thr and force_conv_thr - which you almost reached. $\endgroup$ Commented Apr 1 at 19:03
  • $\begingroup$ Of course, I already have been increased nstep to 150. SCF convergence had proceeded well during the previous 48 BFGS steps, so isn't the inability to converge on the 48th BFGS step now a different issue? $\endgroup$ Commented Apr 3 at 1:42

1 Answer 1

0
$\begingroup$

As far as I know, the condition for vc-relax(bfgs) is that the following three conditions must be satisfied:

  1. etot_conv_thr (&control)
  2. forc_conv_thr (&control)
  3. press_conv_thr (&ions)
  • and what needs to be satisfied during the calculation process trust_radius_min and trust_radius_max (&Ions) (sometimes trust_radius_min causes problem.)

I suggest you use 1,2,3 default values and reduce trust_radius_min 1.d-6.

$\endgroup$
2
  • $\begingroup$ Thank you for your response. I have a few questions: 1. Is there any specific reason to keep 1, 2, and 3 as the default? 2. How does adjusting trust_radius_min affect the consistency of the results? Currently, all the options you mentioned are set to default. $\endgroup$ Commented Apr 3 at 1:48
  • $\begingroup$ 1. You don't necessarily have to use the default value. You can use an appropriate value, but you have to test it several times. 2. I think bfgs is unphysical because it is a numerical algorithm. ( i guess) $\endgroup$ Commented Apr 3 at 5:01

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.