dft scf convergence problem


  • Guest -
Dear nwchem community,

I am having trouble to convergence a wavefunction for a carbon nanotube with 2 hydrogen atoms using DFT+PBE0.
Here is (part of) the input

basis
 * library 3-21g
end

dft
   iterations 2000
   xc pbe0
   direct
   grid fine
   convergence gradient 8E-4 diis 4
end

driver 
  xyz geo
end

task dft optimize


I have two systems (quite similar except for different positioning of the hydrogen atoms.
The structures are optimized PBE geometries from CPMD.

Here is one that works

2b/output: d= 0,ls=0.0,diis     1  -9108.4700250578 -8.16D+04  8.10D+00  2.44D+01  5609.3
2b/output: d= 0,ls=0.5,diis     2  -9034.9757357418  7.35D+01  4.66D-01  8.74D+01 17541.8
2b/output: d= 0,ls=0.5,diis     3  -9041.3269753269 -6.35D+00  2.02D-01  7.76D+01 29413.3
2b/output: d= 0,ls=0.5,diis     4  -9043.6904442580 -2.36D+00  1.21D-01  7.56D+01 41248.0
2b/output: d= 0,ls=0.5,diis     5  -9044.9817332625 -1.29D+00  7.70D+00  7.43D+01 53002.8
2b/output: d= 0,ls=0.5,diis     6  -9095.2034257819 -5.02D+01  3.46D-02  5.85D+01 59436.9
2b/output: d= 0,ls=0.5,diis     7  -9105.7684680531 -1.06D+01  4.17D-03  1.89D+01 65563.8
2b/output: d= 0,ls=0.5,diis     8  -9104.4813523533  1.29D+00  1.18D-03  3.24D+01 71684.0
2b/output: d= 0,ls=0.5,diis     9  -9105.8769727898 -1.40D+00  7.15D-04  2.18D+01 77663.8
2b/output: d= 0,ls=0.5,diis    10  -9107.4244567859 -1.55D+00  1.16D-03  1.31D+01 83650.6
2b/output: d= 0,ls=0.5,diis    11  -9109.2070951994 -1.78D+00  1.27D-03  4.41D+00 92383.6
2b/output: d= 0,ls=0.5,diis    12  -9110.2622692031 -1.06D+00  5.06D-04  6.65D-01100948.2
2b/output: d= 0,ls=0.5,diis    13  -9110.3633724795 -1.01D-01  2.90D-04  3.92D-01108950.1
2b/output: d= 0,ls=0.5,diis    14  -9110.4234724909 -6.01D-02  2.45D-04  2.25D-01114918.9
2b/output: d= 0,ls=0.5,diis    15  -9110.4774325073 -5.40D-02  1.56D-04  6.57D-02120876.2
2b/output: d= 0,ls=0.5,diis    16  -9110.5041094244 -2.67D-02  1.04D-04  2.15D-02126837.3
2b/output: d= 0,ls=0.5,diis    17  -9110.5187859539 -1.47D-02  9.39D-05  1.60D-02132823.1
2b/output: d= 0,ls=0.5,diis    18  -9110.5298692886 -1.11D-02  9.20D-05  1.29D-02138816.4
2b/output: d= 0,ls=0.5,diis    19  -9110.5394020628 -9.53D-03  7.53D-05  9.69D-03144784.6
2b/output: d= 0,ls=0.5,diis    20  -9110.5469022106 -7.50D-03  6.75D-05  7.56D-03150754.4


And one that doesn't

2a/output: d= 0,ls=0.0,diis     1  -9108.5023183806 -8.16D+04  8.27D+00  2.43D+01  5616.0
2a/output: d= 0,ls=0.5,diis     2  -9034.6634884197  7.38D+01  4.65D-01  8.50D+01 17581.9
2a/output: d= 0,ls=0.5,diis     3  -9040.9435208185 -6.28D+00  1.96D-01  7.60D+01 29477.9
2a/output: d= 0,ls=0.5,diis     4  -9043.2585279689 -2.32D+00  1.22D-01  7.42D+01 41316.6
2a/output: d= 0,ls=0.5,diis     5  -9044.5516229056 -1.29D+00  7.86D+00  7.31D+01 53169.2
2a/output: d= 0,ls=0.5,diis     6  -9093.4199801709 -4.89D+01  2.87D-02  6.70D+01 59590.5
2a/output: d= 0,ls=0.5,diis     7  -9080.1167325488  1.33D+01  3.59D-03  1.43D+02 65637.3
2a/output: d= 0,ls=0.5,diis     8  -9095.7736875505 -1.57D+01  1.38D-03  6.66D+01 71659.0
2a/output: d= 0,ls=0.5,diis     9  -9099.3601973387 -3.59D+00  7.82D-04  4.62D+01 77709.0
2a/output: d= 0,ls=0.5,diis    10  -9102.5658530250 -3.21D+00  1.79D-02  3.06D+01 83711.3
2a/output: d= 0,ls=0.5,diis    11  -9030.5701065372  7.20D+01  4.80D-03  3.48D+02 93114.0
2a/output: d= 0,ls=0.5,diis    12  -9035.9333262450 -5.36D+00  3.85D-03  2.94D+02102218.4
2a/output: d= 0,ls=0.5,diis    13  -9039.6119263338 -3.68D+00  3.68D-03  2.71D+02110320.0
2a/output: d= 0,ls=0.5,diis    14  -9042.2300588374 -2.62D+00  1.59D-01  2.66D+02116583.4
2a/output: d= 0,ls=0.5,diis    15   -942.0039711970  8.10D+03  7.09D-02  1.99D+04123442.3
2a/output: d= 0,ls=0.5,diis    16  -3417.0117307364 -2.48D+03  4.12D-02  1.52D+04130265.1
2a/output: d= 0,ls=0.5,diis    17  -4366.1889341364 -9.49D+02  3.40D-02  1.61D+04137121.0
2a/output: d= 0,ls=0.5,diis    18  -4847.9189437237 -4.82D+02  5.71D+00  1.96D+04144007.5
2a/output: d= 0,ls=0.5,diis    19  43359.2082533070  4.82D+04  7.22D+00  3.62D+03152453.2
2a/output: d= 0,ls=0.5,diis    20  35898.8558078528 -7.46D+03  4.11D+00  1.53D+04160518.8
2a/output: d= 0,ls=0.5,diis    21  24338.8539746737 -1.16D+04  4.64D-01  2.30D+04167974.2
2a/output: d= 0,ls=0.5,diis    22  22345.8899119936 -1.99D+03  6.14D-01  2.31D+04175136.6



It seems to me that the initial step size is too large and the DIIS algorithm gets lost for the latter geometry.
Is there a way to choose the initial DIIS step size?
Or is there another, algorithm like steepest descent or conjugate gradient that I can try for the SCF convergence?
(I could not find it in the part of manual about dft)

Thank you in advance for any suggestions.

Best, Jaap

Forum Regular
Hi Jaap,

We are aware of the convergence issues with the standard diis. I will be releasing a quadratic convergence algorithm as soon as I tie up some loose ends. In the meantime the following modified input should help convergence.

Here's the modified input. This will do a HF calculation and then use these vectors as input for the PBE0

basis
* library 3-21g
end

scf
 maxiter 100
direct
vectors output hf.movecs
end
task scf energy

dft
  iterations 2000
xc pbe0
direct
grid fine
vectors input hf.movecs output pbe0.movecs
end

driver
 xyz geo
end

task dft optimize


Let me know if there are further issues.

Best wishes,
-Niri

Clicked A Few Times
task_gradient failed" in file output.
Hi

I'm doing a sequence of geometry optimizations of nano magnetic molecule . I got message "driver: task_gradient failed" in file output.Please help me.
this is input and out put
Cr 4.83000000 18.26000000 5.06700000
Cr 6.05800000 16.08500000 2.77700000
Cr 6.70500000 16.20100000 -0.56700000
Cr 6.02500000 18.38500000 -3.02500000
Cr 5.52400000 21.70900000 -3.12700000
Cr 4.15300000 23.86000000 -0.92300000
Cr 3.82700000 23.84100000 2.46000000
Cr 3.84800000 21.49900000 4.91200000
F 5.00000000 17.59800000 3.28400000
F 6.62200000 16.99600000 1.18100000
F 5.74400000 17.70300000 -1.27000000
F 6.17700000 20.13300000 -2.26400000
F 4.47000000 22.09100000 -1.57500000
F 4.68200000 23.27600000 0.83500000
F 3.67600000 22.02700000 3.07700000
F 4.97900000 20.04800000 4.39300000
O 6.78000000 18.20900000 5.30200000
O 7.60400000 16.82000000 3.74700000
O 5.47000000 15.03100000 4.30900000
O 4.62300000 16.45200000 5.80600000
O 4.43400000 15.47800000 1.85400000
O 4.93100000 15.39600000 -0.32300000
O 7.20200000 14.56000000 2.31200000
O 7.74300000 14.70600000 0.14000000
O 8.40600000 17.11700000 -0.91200000
O 7.97000000 18.18400000 -2.84000000
O 6.78500000 15.27600000 -2.29100000
O 5.83900000 16.60100000 -3.82100000
O 3.97200000 20.76000000 -3.87500000
O 4.09200000 18.60600000 -3.25200000
O 6.38000000 19.05500000 -4.83000000
O 6.60900000 21.29400000 -4.70000000
O 7.03600000 22.73800000 -2.42300000
O 6.01200000 24.39400000 -1.30800000
O 4.90300000 23.30000000 -4.08800000
O 3.59300000 24.48300000 -2.70300000
O 4.02300000 25.69700000 1.92500000
O 3.86200000 25.69600000 -0.31600000
O 2.07400000 23.61900000 1.63900000
O 2.31000000 23.30300000 -0.57000000
O 2.94600000 24.56700000 4.04300000
O 2.67100000 22.92700000 5.53200000
O 5.57500000 24.00000000 3.33700000
O 5.41900000 22.65500000 5.12500000
O 2.23100000 20.40500000 4.76300000
O 2.87400000 18.27600000 4.89700000
O 4.68600000 18.90000000 6.91100000
O 4.02200000 21.01600000 6.80500000
C 7.71900000 17.65500000 4.68800000
C 4.87200000 15.29200000 5.37600000
C 4.11700000 15.50500000 0.62900000
C 7.90300000 14.25900000 1.31400000
C 8.73000000 17.83300000 -1.90000000
C 6.26200000 15.48900000 -3.41500000
C 3.47600000 19.61000000 -3.70900000
C 6.76000000 20.17600000 -5.27300000
C 7.02500000 23.84500000 -1.81900000
C 4.07900000 24.21900000 -3.83500000
C 4.03300000 26.27100000 0.79500000
C 1.68300000 23.18300000 0.51700000
C 2.51400000 24.10200000 5.13300000
C 6.00800000 23.51800000 4.41100000
C 4.38800000 20.00300000 7.42600000
C 2.00600000 19.17200000 4.84500000
H 6.16962115 14.65568490 -4.07979478
H 4.54536315 14.46555159 5.97197935
H 8.71312283 17.91279322 4.98827063
H 6.95948588 23.86738842 4.75378616
H 4.19976588 27.32783792 0.78148114
H 7.95701545 24.36347468 -1.73279554
H 4.45422248 20.07944528 8.49120923
H 1.96825662 24.76753525 5.76870984
H 0.98203193 18.86277020 4.87268262
H 3.76377082 24.82991892 -4.65494429
H 8.70336396 13.56598295 1.46906417
H 9.74377315 18.17268023 -1.94220589
H 7.25573994 20.18002978 -6.22122238
H 2.44911228 19.47509667 -3.97770561
H 0.74391515 22.67092139 0.48880153
H 3.08237176 15.62947874 0.38620494
end
basis
cr library ahlrichs_vtz
f library ahlrichs_vdz
n library ahlrichs_vdz
c library ahlrichs_vdz
o library ahlrichs_vdz
h library ahlrichs_vdz
end
dft
direct
xc b3lyp
print "information"
end
set geometry:actlist 1:64
task dft optimize
====================================================================
Northwest Computational Chemistry Package (NWChem) 6.6




convergence iter energy DeltaE RMS-Dens Diis-err time

----- ----------------- --------- --------- --------- ------
d= 0,ls=0.0,diis 1 -12173.8522960751 -3.21D+04 2.26D-02 5.80D+01 43.7
Grid integrated density: 632.000730589235
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 2 -12016.7646082068 1.57D+02 1.13D-02 1.72D+03 75.1
Grid integrated density: 632.000763579225
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 3 -12126.0210063723 -1.09D+02 5.71D-03 6.20D+02 107.0
Grid integrated density: 632.000767075167
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 4 -12153.4664582258 -2.74D+01 8.70D-03 2.63D+02 139.8
Grid integrated density: 632.000761692067
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 5 -12170.5346824699 -1.71D+01 4.47D-03 8.51D+01 172.7
Grid integrated density: 632.000736748784
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 6 -12175.4721315112 -4.94D+00 3.56D-03 2.48D+01 205.0
Grid integrated density: 632.000726726922
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 7 -12177.2973142383 -1.83D+00 2.17D-03 5.86D+00 236.8
Grid integrated density: 632.000725354871
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 8 -12177.3612609927 -6.39D-02 1.23D-03 5.93D+00 268.4
Grid integrated density: 632.000723862264
Requested integration accuracy: 0.10E-05
Resetting Diis
d= 0,ls=0.5,diis 9 -12177.3646237781 -3.36D-03 8.14D-04 5.99D+00 300.7
Grid integrated density: 632.000719154408
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 10 -12177.3088166840 5.58D-02 9.11D-03 6.75D+00 340.9
Grid integrated density: 632.000709090866
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 11 -12165.5517606354 1.18D+01 1.59D-03 1.43D+02 380.5
Grid integrated density: 632.000709367218
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 12 -12167.9777969842 -2.43D+00 1.13D-03 9.66D+01 419.9
Grid integrated density: 632.000711136854
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 13 -12170.3060126876 -2.33D+00 7.45D-04 7.60D+01 459.6
Grid integrated density: 632.000711997621
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 14 -12171.6769849906 -1.37D+00 3.93D-04 6.54D+01 499.9
Grid integrated density: 632.000712358795
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 15 -12172.0755527653 -3.99D-01 3.29D-04 6.16D+01 540.6
Grid integrated density: 632.000712629240
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 16 -12172.4370651068 -3.62D-01 3.28D-04 5.82D+01 580.4
Grid integrated density: 632.000712792887
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 17 -12172.8721674975 -4.35D-01 4.15D-04 5.44D+01 621.4
Grid integrated density: 632.000713032789
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 18 -12173.3814633723 -5.09D-01 4.92D-04 4.99D+01 662.0
Grid integrated density: 632.000713966532
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 19 -12173.8531654767 -4.72D-01 3.67D-04 4.54D+01 701.6
Grid integrated density: 632.000712690950
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 20 -12173.9222160837 -6.91D-02 9.05D-03 4.56D+01 741.4
Grid integrated density: 632.000715326167
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 21 -12171.2154617033 2.71D+00 2.37D-03 1.11D+02 781.4
Grid integrated density: 632.000717325894
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 22 -12175.1442832953 -3.93D+00 1.41D-03 4.12D+01 820.8
Grid integrated density: 632.000715920188
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 23 -12176.6543001533 -1.51D+00 1.14D-03 2.01D+01 860.6
Grid integrated density: 632.000715606592
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 24 -12177.3815262957 -7.27D-01 5.73D-04 8.82D+00 900.3
Grid integrated density: 632.000714370179
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 25 -12177.5258368787 -1.44D-01 7.21D-04 6.79D+00 940.3
Grid integrated density: 632.000714584657
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 26 -12177.2523054193 2.74D-01 4.62D-04 1.13D+01 979.2
Grid integrated density: 632.000714994362
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 27 -12177.0116558493 2.41D-01 7.78D-04 1.48D+01 1019.0
Grid integrated density: 632.000715801477
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 28 -12176.3000521372 7.12D-01 8.03D-04 2.49D+01 1058.4
Grid integrated density: 632.000716447040
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 29 -12175.4943676593 8.06D-01 6.43D-04 3.52D+01 1098.5
Grid integrated density: 632.000716745786
Requested integration accuracy: 0.10E-05
d= 0,ls=0.5,diis 30 -12174.7595229122 7.35D-01 5.60D-04 4.33D+01 1139.6
Grid integrated density: 632.000717517363
Requested integration accuracy: 0.10E-05
Calculation failed to converge


Total DFT energy = -12175.394034932382
One electron energy = -56577.666461615336
Coulomb energy = 25307.257820426723
driver: task_gradient failed 0




current input line :
0:


driver: task_gradient failed 0




driver: task_gradient failed 0




current input line :
0:
driver: task_gradient failed 0




current input line :
0:

your Sincerely motahare


Forum >> NWChem's corner >> Running NWChem