Turning damping and level shift on/off

28 views
Skip to first unread message

Liam

unread,
Apr 9, 2024, 10:58:59 AMApr 9
to NWChem Forum
Hi,

I am currently just testing the levlon/levloff and dampon/dampoff options on a small cluster on my local build, to try understand how they work before applying it to a bigger cluster. However I cannot seem to get either to work properly. 
From everything I have tried, it just seems that damping turns off after 2 iterations, and lshift never turns off (and mostly only applies from the 2nd iteration, but not always).
For example my SCF information for the most part looks like this, no matter what the convergence criteria:

 convergence    iter        energy       DeltaE   RMS-Dens  Diis-err    time
 ---------------- ----- ----------------- --------- --------- ---------  ------
 d=70,ls=0.0,diis     1   -640.5808034932 -9.47D+02  8.51D-02  4.71D+00     7.2
                                                     8.51D-02  4.71D+00
 Grid integrated density:      70.000081009144
 Requested integration accuracy:   0.10E-05
 d=70,ls=5.0,diis     2   -640.4735849236  1.07D-01  5.99D-02  8.12D-01    14.5
                                                     5.99D-02  8.12D-01
 Grid integrated density:      70.000088651472
 Requested integration accuracy:   0.10E-05
 d= 0,ls=5.0,diis     3   -635.1814201008  5.29D+00  4.19D-02  5.03D+00    21.6
                                                     4.19D-02  5.03D+00
 Grid integrated density:      70.000109566105
 Requested integration accuracy:   0.10E-05
 d= 0,ls=5.0,diis     4   -608.2283161149  2.70D+01  3.65D-03  3.55D+01    28.7
                                                     3.65D-03  3.55D+01
 Grid integrated density:      70.000112220672
 Requested integration accuracy:   0.10E-05

For this case I try to turn damping/lshift off using dampon/levlon = 1d99 and dampoff/levloff = 1d-2, corresponding to a deltaE of 1d-2. I know it hasn't reached it here but in other cases where it has the lshift hasn't changed in the SCF information.

I'm not sure whether it is just a case of me not understanding this option properly. If anyone could help me out with this it would be massively helpful. I have attached my input file if that helps.

Thank you in advance,
Liam


mgo.nw

Edoardo Aprà

unread,
Apr 10, 2024, 8:20:50 PMApr 10
to NWChem Forum
If you want to stick to integer occupation, this simple input converges
=====================
echo
start

geometry  print units bohr
Mg       -0.00000    -0.00000     0.00000
O        -0.00000    -0.00000     3.97138
O        -3.97138    -0.00000    -0.00000
O        -0.00000     3.97138     0.00000
O         3.97138    -0.00000     0.00000
O        -0.00000    -3.97138     0.00000
O        -0.00000     0.00000    -3.97138
end


basis "ao basis" spherical
* library def2-svp
end

dft
 mulliken
 xc pbe0
 vectors input atomic swap 36 30
 max_ovl
end

task dft energy gradient

Liam

unread,
Apr 11, 2024, 11:51:39 AMApr 11
to NWChem Forum
Hi Edoardo,

Thank you for your response. So I don't have an issue with this file converging neccesarily. This was just a small MgO cluster I made that I can run quickly on my local machine to try get an understanding of how turning on/off level shift and damping works before I can then apply it to a much larger I have and submit that job to a HPC cluster.
My initial question was much more in regards to the specific aspects of those options and whether anyone could help me with what inputs would be correct for turning off damping and lshift at a certain change in energy as I have had a lot of trouble getting both to turn on and off when I hope they would.

Thanks,
Liam

Edoardo Aprà

unread,
Apr 11, 2024, 10:24:25 PMApr 11
to NWChem Forum
The correct syntax for the level shifter option requires setting ncysh  equal to zero

convergence  ncysh 0 lshift 0.75 levlon  1d99 levloff 1d-2

Likewise, for damping you need to set ncydp equal to 0

convergence  ncydp 0 dampon 1d99 dampoff 1d-4 damp 45

Liam

unread,
Apr 13, 2024, 4:03:02 AMApr 13
to NWChem Forum
Amazing thank you so much for that response, it has helped at least in terms of the damping part. But I still can't seem to have lshift turn off. Here's a part of some SCF information I have:

 d=10,ls=2.5,diis    32   -643.5405464337 -1.70D-02  1.21D-03  7.17D-02   211.0
                                                     1.21D-03  7.17D-02
 d=10,ls=2.5,diis    33   -643.5554235792 -1.49D-02  1.12D-03  6.28D-02   217.5
                                                     1.12D-03  6.28D-02
 d=10,ls=2.5,diis    34   -643.5681793218 -1.28D-02  1.06D-03  5.54D-02   224.1
                                                     1.06D-03  5.54D-02
 d=10,ls=2.5,diis    35   -643.5793508222 -1.12D-02  9.97D-04  4.89D-02   230.6
                                                     9.97D-04  4.89D-02
 d= 0,ls=2.5,diis    36   -643.5883465223 -9.00D-03  9.24D-04  4.52D-02   237.1
                                                     9.24D-04  4.52D-02
 d= 0,ls=2.5,diis    37   -643.5970404265 -8.69D-03  7.65D-04  4.15D-02   243.7
                                                     7.65D-04  4.15D-02
 d= 0,ls=2.5,diis    38   -643.6044413377 -7.40D-03  7.05D-04  3.75D-02   250.2
                                                     7.05D-04  3.75D-02
 d= 0,ls=2.5,diis    39   -643.6112429303 -6.80D-03  6.63D-04  3.33D-02   256.7
                                                     6.63D-04  3.33D-02

Where the convergence options are as follows:

convergence energy   1.0E-06 \
                density  1.0E-05 \
                gradient 5.0E-04 \
                damp 10 \
                diis 10 \
                lshift 2.5 \
                dampon  1d99 \
                dampoff 1d-2 \
                diison  0.0 \
                diisoff 0.0 \
                levlon  1d99 \
                levloff 1d-2 \
                ncydp 0 \
                ncyds 0 \
                ncysh 0 \
                hl_tol 0.1

And as you can see I've changed the number of cycles for damp/lshift to zero and that in the SCF info, the damping correctly turns itself off at iteration 36 when deltaE goes below 1d-2, but the lshift, it still remains at 2.5 after this iteration. 
I'm not sure if you know any reason why or not and at this point I am thinking it may just be a visual issue. 
Thank you again for your help so far

Edoardo Aprà

unread,
Apr 14, 2024, 2:14:09 PMApr 14
to NWChem Forum
Simple Input file
start
geometry  units bohr

Mg       -0.00000    -0.00000     0.00000
O        -0.00000    -0.00000     3.97138
O        -3.97138    -0.00000    -0.00000
O        -0.00000     3.97138     0.00000
O         3.97138    -0.00000     0.00000
O        -0.00000    -3.97138     0.00000
O        -0.00000     0.00000    -3.97138
end


basis "ao basis" spherical
* library def2-svp
end

charge -10
dft
xc pbe0
convergence  ncysh 0 lshift 0.75 levlon  1d99 levloff 1d-2 ncydp 0 damp 40 dampon 1d99 dampoff 1d-4
end
task dft

Portion of associated output file

Warning: spatial symmetry breaking: alpha =  1.22D-01
 d=40,ls=0.8,diis     8   -642.3810341712 -2.41D-02  2.96D-03  1.99D-02     3.0
 Warning: spatial symmetry breaking: alpha =  1.24D-01
 d=40,ls=0.8,diis     9   -642.3916197032 -1.06D-02  2.87D-03  1.07D-02     3.2
 Warning: spatial symmetry breaking: alpha =  6.70D-02
 d=40,ls=0.0,diis    10   -642.3968672239 -5.25D-03  5.08D-03  1.90D-03     3.4
 Warning: spatial symmetry breaking: alpha =  8.47D-02
 d=40,ls=0.0,diis    11   -642.3994036241 -2.54D-03  1.56D-03  2.04D-03     3.7
 Warning: spatial symmetry breaking: alpha =  8.91D-02
 d=40,ls=0.0,diis    12   -642.4005640956 -1.16D-03  6.95D-04  3.60D-04     3.9
Reply all
Reply to author
Forward
0 new messages