Dear Q-Chem Developers,
I am running some test calculations with TDDFT-1D. (For the systems that I tried so far, this method seems to perform well.) But I occasionally run into convergence problems, where the Davidson algorithm runs out of iterations, see below.
How to increase the maximum allowed number of iterations? The keywords GEN_CIS_ITER, CIS_MAX_CYCLES, and MAX_CIS_CYCLES have no effect on this part of the calculation.
With kind regards,
Michał Kochman
Calculating TDDFT-1D/CIS-1D States
--------------------------
Iteration Residue
--------------------------
1 0.00513030
2 0.00152117
3 0.00128665
4 0.00110539
5 0.00073493
6 0.00048979
7 0.00043364
8 0.00044552
9 0.00021379
10 0.00008964
11 0.00003913
12 0.00001201
13 0.00000414
14 0.00000149
15 0.00000052
16 0.00000019
17 0.00000006
18 0.00000002
19 0.00000001
20 0.00000001
21 0.00000001
22 0.00000001
23 0.00000001
24 0.00000001
25 0.00000001
26 0.00000001
27 0.00000001
28 0.00000001
29 0.00000001
30 0.00000001
31 0.00000001
32 0.00000001
33 0.00000001
34 0.00000001
35 0.00000001
36 0.00000001
37 0.00000007
38 0.00000067
39 0.00000940
40 0.00013070
41 0.00343136
42 0.00032414
43 0.00013039
44 0.00011315
45 0.00011171
Q-Chem fatal error occurred in module libcis1d/solve_cis1d_H.C, line 906:
Increase jmax for TDDFT-1D Davidson diagonalization routine or reduce nroots
Please submit a crash report at q-chem.com/reporter
Looking at the code, it seems that ‘jmax’ is the max no. of Davidson subspace vectors, which is set based on the no. of roots requested and the max no. of iterations, which is hard-coded.
Dear Professor Herbert,
Thank you for the clarification. Is there perhaps a way to obtain a modified copy of the program with an increased maximum allowed number of iterations? Once I have a license for Q-Chem 6.3, that is.
I would like to use TDDFT-1D in surface hopping simulations. Intermittent convergence failures would be tolerable, but rather inelegant.
Best regards,
Michał
I am working on adding it to the 6.3.1 bug-fix release, which you would get for free with a 6.3 license.
That’s awesome - thank you!!!
Dear Professor Herbert, Dear All,
During the test simulations, I’ve also encountered situations where the TDDFT-1D calculation predicts extremely large forces. I’m pasting one such input file below; it is based on the example inputs from the online manual. In order to have a benchmark for TDDFT-1D, I performed an analogous calculation with conventional DFT.
Is there a problem with my input file, or is this something else? Can another user reproduce this behavior?
With best regards,
Michał
==> input_dft <==
$molecule
0 1
C -0.088608263 2.361044226 -0.000153195
C 1.025811498 -0.071882764 -0.000533471
C 0.715986814 -1.608618043 -0.000014608
C -0.629007630 -1.616074014 -0.000738972
C -1.013108372 -0.095363424 0.002150365
C -0.007322368 0.697563797 0.001270912
H 0.837067161 2.928507334 0.112605245
H -1.028903786 2.900461192 -0.113771491
H 2.063036459 0.277009259 -0.004779674
H 1.405152205 -2.445492400 -0.000985477
H -1.286808943 -2.478162319 0.000101365
H -2.059197723 0.214026319 0.004849000
$end
$rem
scf_guess sad
JOBTYPE force
SYM_IGNORE TRUE
EXCHANGE wb97x
BASIS def2-SV(P)
unrestricted false
$end
==> input_tddft1d <==
$molecule
0 1
C -0.088608263 2.361044226 -0.000153195
C 1.025811498 -0.071882764 -0.000533471
C 0.715986814 -1.608618043 -0.000014608
C -0.629007630 -1.616074014 -0.000738972
C -1.013108372 -0.095363424 0.002150365
C -0.007322368 0.697563797 0.001270912
H 0.837067161 2.928507334 0.112605245
H -1.028903786 2.900461192 -0.113771491
H 2.063036459 0.277009259 -0.004779674
H 1.405152205 -2.445492400 -0.000985477
H -1.286808943 -2.478162319 0.000101365
H -2.059197723 0.214026319 0.004849000
$end
$rem
scf_guess sad
JOBTYPE force
SYM_IGNORE TRUE
EXCHANGE wb97x
BASIS def2-SV(P)
cis1d_n_roots 2
cis1d_state_deriv 0
unrestricted false
$end
The DFT calculation gives the following gradient:
Gradient of SCF Energy
1 2 3 4 5 6
1 -0.0168302 -0.2099039 -0.0720928 0.0844391 0.1991089 0.0098021
2 0.1516918 0.1711736 -0.1267694 -0.1143080 0.1907228 -0.2763677
3 -0.0005074 -0.0023572 0.0004825 -0.0007728 0.0027484 0.0003371
7 8 9 10 11 12
1 -0.0039658 0.0065789 -0.0028910 -0.0076714 0.0087759 0.0046502
2 -0.0002376 0.0033010 0.0001942 -0.0001672 0.0003455 0.0004208
3 0.0016882 -0.0016075 -0.0001039 0.0004126 -0.0003852 0.0000652
On the other hand, the TDDFT-1D calculation unexpectedly gives a very large gradient:
---------------------------------------------------
Gradient of CIS-1D State 0
Atom X Y Z
---------------------------------------------------
1 -6.221541 -1.088580 0.792764
2 -10.936383 14.960626 0.268656
3 -4.446334 2.609945 0.274890
4 -5.139905 -2.307484 0.274876
5 -11.747931 -15.487560 0.151922
6 39.679988 1.228548 -1.227377
7 0.098560 -0.192581 -0.135432
8 0.013076 0.247201 -0.059577
9 -0.317535 -0.049124 -0.073053
10 -0.330544 -0.575749 -0.094315
11 -0.364295 0.582971 -0.078553
12 -0.287157 0.071786 -0.094801
---------------------------------------------------
I have seen this as well in the test job. I’m not an expert in this method but it may be related to MECP optimization, where you are in a certain sense approaching a singularity.
Update: I have added a keyword CIS1D_MAX_CYCLES to let the user adjust the no. of Davidson iterations. This will appear in Q-Chem 6.3.1.
Dear Professor Herbert,
It seems that the large gradients are related to sudden changes in the energy of the doubly excited configuration that is used by TDDFT-1D. In order to demonstrate this point, I ran two calculations at near-identical molecular geometries:
==> input_tddft1d_1 <==
$molecule
0 1
C -0.088608263 2.361044226 -0.000153195
C 1.025811498 -0.071882764 -0.000533471
C 0.715986814 -1.608618043 -0.000014608
C -0.629007630 -1.616074014 -0.000738972
C -1.013108372 -0.095363424 0.002150365
C -0.007322368 0.697563797 0.001270912
H 0.837067161 2.928507334 0.112605245
H -1.028903786 2.900461192 -0.113771491
H 2.063036459 0.277009259 -0.004779674
H 1.405152205 -2.445492400 -0.000985477
H -1.286808943 -2.478162319 0.000101365
H -2.059197723 0.214026319 0.004849000
$end
$rem
scf_guess sad
JOBTYPE force
SYM_IGNORE TRUE
EXCHANGE wb97x
BASIS def2-SV(P)
cis1d_n_roots 2
cis1d_state_deriv 0
unrestricted false
$end
==> input_tddft1d_2 <==
$molecule
0 1
C -0.088608263 2.361044226 -0.000153195
C 1.025811498 -0.071882764 -0.000533471
C 0.715986814 -1.608618043 -0.000014608
C -0.629007630 -1.616074014 -0.000738972
C -1.013108372 -0.095363424 0.002150365
C -0.006322368 0.697563797 0.001270912
H 0.837067161 2.928507334 0.112605245
H -1.028903786 2.900461192 -0.113771491
H 2.063036459 0.277009259 -0.004779674
H 1.405152205 -2.445492400 -0.000985477
H -1.286808943 -2.478162319 0.000101365
H -2.059197723 0.214026319 0.004849000
$end
$rem
scf_guess sad
JOBTYPE force
SYM_IGNORE TRUE
EXCHANGE wb97x
BASIS def2-SV(P)
cis1d_n_roots 2
cis1d_state_deriv 0
unrestricted false
$end
The first calculation gives
logfile_tddft1d_1: SCF energy = -231.73040845
logfile_tddft1d_1:Final minimized Ed = -231.580980187856653
logfile_tddft1d_1:Energy for State 0 (Hartree): -231.75517315
logfile_tddft1d_1:Energy for State 1 (Hartree): -231.73473598
And the second one gives
logfile_tddft1d_2: SCF energy = -231.73043475
logfile_tddft1d_2:Final minimized Ed = -231.607185116353406
logfile_tddft1d_2:Energy for State 0 (Hartree): -231.78727183
logfile_tddft1d_2:Energy for State 1 (Hartree): -231.73300329
As expected, the SCF energy changes very little on going from geometry 1 to geometry 2. The other energies change sharply.
The good news is, this situation appears to be relatively rare. It should still be possible to use TDDFT-1D surface hopping simulations. So, thank you for adding the keyword which will allow increasing the number of iterations!
Best regards,
Michał