Possible error in TDDFT Gradient

From NWChem

Viewed 506 times, With a total of 6 Posts
Jump to: navigation, search

Just Got Here
Threads 1
Posts 2
I may have found an issue with the CIS/TDA gradient (which possibly is also present in the full TDDFT). Version is Nwchem-6.5.revision26243-src.2014-09-10 with the Parallelmpi.patch applied. Consider the following input:
ECHO
PRINT DEBUG
START temp
TITLE "gradient calc"
GEOMETRY units au noautoz
symmetry c1
Be 0.0 0.0 0.0
Be 1.0 0.0 0.0
H 0.0 0.0 0.7
H 1.0 0.2 -0.6
END
BASIS "ao basis" PRINT spherical
Be    S
  936.8902499    0.0091636
  171.7778018    0.0493615
   48.0572387    0.1685383
   16.5089585    0.3705628
    6.4109117    0.4164915
    2.6403675    0.1303341
Be    S
   19.0644035    0.0091636
    3.4954375    0.0493615
    0.9778975    0.1685383
    0.3359342    0.3705628
    0.1304531    0.4164915
    0.0537278    0.1303341
Be    S
   13.0509616    0.0091636
    2.3928795    0.0493615
    0.6694415    0.1685383
    0.2299712    0.3705628
    0.0893046    0.4164915
    0.0367805    0.1303341
H     S
   33.2683653    0.0091636
    6.0997184    0.0493615
    1.7064814    0.1685383
    0.5862224    0.3705628
    0.2276473    0.4164915
    0.0937577    0.1303341
END
DFT
 XC HFexch 1.0
END
TDDFT
 CIS
 NROOTS 5
 NOTRIPLET
 thresh 1e-5
 TARGET 1
 CIVECS
 PRINT DEBUG
 FREEZE virtual 2
 GRAD
   ROOT 1
   PRINT DEBUG
 END
END
TASK TDDFT GRADIENT 

A rather strange but well-behaved molecule with some frozen virtuals.

The resulting NWCHEM analytical gradient is:
    atom               coordinates                        gradient           
                 x          y          z           x          y          z   
   1 Be     -0.500000  -0.020000  -0.010000    7.274093   0.804309   5.306119
   2 Be      0.500000  -0.020000  -0.010000   -7.226557   3.004583  -6.231942
   3 H      -0.500000  -0.020000   0.690000    1.220940  -0.550613  -6.921864
   4 H       0.500000   0.180000  -0.610000   -1.268477  -3.258278   7.847687


By changing the task line to
TASK TDDFT GRADIENT numerical 

I obtain the NWCHEM numerical gradient:
   atom               coordinates                        gradient
                x          y          z           x          y          z
  1 Be     -0.500000  -0.020000  -0.010000    7.294946   0.808334   5.284754
  2 Be      0.500000  -0.020000  -0.010000   -7.252036   3.003535  -6.211470
  3 H      -0.500000  -0.020000   0.690000    1.211833  -0.557386  -6.885883
  4 H       0.500000   0.180000  -0.610000   -1.254743  -3.254483   7.812599


Note the deviations in the second decimal place. I would consider this high, so high in fact, that I believe to have found a bug. Calculations using ORCA confirm this.
Consider the ORCA numerical gradient:
The cartesian numerical gradient:
---------------------------------
   1   Be  :    7.292673109    0.809276482    5.284813140
   2   Be  :   -7.250520943    3.004624398   -6.211909732
   3   H   :    1.212733473   -0.558310659   -6.886530418
   4   H   :   -1.254885640   -3.255590221    7.813627010


and the analytical counterpart:
CARTESIAN GRADIENT
------------------
   1   Be  :    7.292401418    0.809317573    5.284476022
   2   Be  :   -7.250268956    3.004906532   -6.211600815
   3   H   :    1.212702264   -0.558350628   -6.886268442
   4   H   :   -1.254834726   -3.255873477    7.813393235


Concerning the settings, I am confident to have performed the freezing correctly in both programs, given that I obtain the following excitation energies:
 NWCHEM        ORCA    
 0.147882333   0.147883
 0.567416779   0.567417
 1.182899967   1.182900
 4.676393656   4.676394
 5.899078825   5.899079

In any event, the numerical vs. analytical discrepancies of NWCHEM seem high. It would be great if someone could confirm the issue.

Gets Around
Threads 16
Posts 122
I tried your inputs and tried setting "grid xfine" in the dft block. The extra fine grid did not improve agreement. I see the same deviations you do, and I am running the latest snapshot (27248, released July 10).

  • Niri Forum:Admin, Forum:Mod, NWChemDeveloper, bureaucrat, sysop
    Profile
    Send PM
Gets Around
Threads 4
Posts 158
Hi, I will look into this and get back to you.

Best,
-Niri Govind

niri.govind@pnnl.gov

  • Niri Forum:Admin, Forum:Mod, NWChemDeveloper, bureaucrat, sysop
    Profile
    Send PM
Gets Around
Threads 4
Posts 158
Hi,

To narrow this down. How do the gradients compare when you don't freeze the orbitals ?

Best,
-Niri

Just Got Here
Threads 1
Posts 2
@Mernst: Thank you for confiming. grid xfine should have no effect, since this should be a HF calculation.

@Niri: I suppose the latest snapshot contains the patches released for my version. I thus think for this issue, it is not useful to apply those patches and recompile my copy?

Concerning your second post: With no freezing, everything seems to be fine. Freezing two core orbitals greatly exacerbates the error, see below horizontal line.

I am chiefly concerned with RPA, where at least for the virtuals the same problem seems to exist. However, for CIS I could compare the existing implementation in ORCA.



The following results have been obtained using the same input as above, except for omitting, or replacing the freezing line by virt 2, core 2, or both - as appropriate.
none/ana:                         TDDFT ENERGY GRADIENTS
none/ana-
none/ana-    atom               coordinates                        gradient
none/ana-                 x          y          z           x          y          z
none/ana-   1 Be     -0.500000  -0.020000  -0.010000    7.291976   0.809286   5.284318
none/ana-   2 Be      0.500000  -0.020000  -0.010000   -7.249933   3.004841  -6.211452
none/ana-   3 H      -0.500000  -0.020000   0.690000    1.212830  -0.558311  -6.886222
none/ana-   4 H       0.500000   0.180000  -0.610000   -1.254873  -3.255815   7.813357
--
none/num:                         TDDFT ENERGY GRADIENTS
none/num-
none/num-    atom               coordinates                        gradient
none/num-                 x          y          z           x          y          z
none/num-   1 Be     -0.500000  -0.020000  -0.010000    7.294522   0.808303   5.284596
none/num-   2 Be      0.500000  -0.020000  -0.010000   -7.251702   3.003468  -6.211317
none/num-   3 H      -0.500000  -0.020000   0.690000    1.211959  -0.557347  -6.885835
none/num-   4 H       0.500000   0.180000  -0.610000   -1.254779  -3.254424   7.812556
--
core/ana:                         TDDFT ENERGY GRADIENTS
core/ana-
core/ana-    atom               coordinates                        gradient
core/ana-                 x          y          z           x          y          z
core/ana-   1 Be     -0.500000  -0.020000  -0.010000   13.267058   0.934942   5.551076
core/ana-   2 Be      0.500000  -0.020000  -0.010000  -13.005705   3.066677  -6.110679
core/ana-   3 H      -0.500000  -0.020000   0.690000    1.574466  -0.567779  -7.754693
core/ana-   4 H       0.500000   0.180000  -0.610000   -1.835818  -3.433840   8.314296
--
core/num:                         TDDFT ENERGY GRADIENTS
core/num-
core/num-    atom               coordinates                        gradient
core/num-                 x          y          z           x          y          z
core/num-   1 Be     -0.500000  -0.020000  -0.010000    7.294510   0.808444   5.284515
core/num-   2 Be      0.500000  -0.020000  -0.010000   -7.251686   3.003588  -6.211186
core/num-   3 H      -0.500000  -0.020000   0.690000    1.212113  -0.557457  -6.885957
core/num-   4 H       0.500000   0.180000  -0.610000   -1.254938  -3.254576   7.812628
--
virt/ana:                         TDDFT ENERGY GRADIENTS
virt/ana-
virt/ana-    atom               coordinates                        gradient
virt/ana-                 x          y          z           x          y          z
virt/ana-   1 Be     -0.500000  -0.020000  -0.010000    7.274093   0.804309   5.306119
virt/ana-   2 Be      0.500000  -0.020000  -0.010000   -7.226557   3.004583  -6.231942
virt/ana-   3 H      -0.500000  -0.020000   0.690000    1.220940  -0.550613  -6.921864
virt/ana-   4 H       0.500000   0.180000  -0.610000   -1.268477  -3.258278   7.847687
--
virt/num:                         TDDFT ENERGY GRADIENTS
virt/num-
virt/num-    atom               coordinates                        gradient
virt/num-                 x          y          z           x          y          z
virt/num-   1 Be     -0.500000  -0.020000  -0.010000    7.294946   0.808334   5.284754
virt/num-   2 Be      0.500000  -0.020000  -0.010000   -7.252036   3.003535  -6.211470
virt/num-   3 H      -0.500000  -0.020000   0.690000    1.211833  -0.557386  -6.885883
virt/num-   4 H       0.500000   0.180000  -0.610000   -1.254743  -3.254483   7.812599
--
vico/ana:                         TDDFT ENERGY GRADIENTS
vico/ana-
vico/ana-    atom               coordinates                        gradient
vico/ana-                 x          y          z           x          y          z
vico/ana-   1 Be     -0.500000  -0.020000  -0.010000   13.228743   0.931501   5.579964
vico/ana-   2 Be      0.500000  -0.020000  -0.010000  -12.961909   3.072499  -6.144026
vico/ana-   3 H      -0.500000  -0.020000   0.690000    1.586143  -0.560906  -7.802049
vico/ana-   4 H       0.500000   0.180000  -0.610000   -1.852976  -3.443094   8.366112
--
vico/num:                         TDDFT ENERGY GRADIENTS
vico/num-
vico/num-    atom               coordinates                        gradient
vico/num-                 x          y          z           x          y          z
vico/num-   1 Be     -0.500000  -0.020000  -0.010000    7.294871   0.808349   5.284761
vico/num-   2 Be      0.500000  -0.020000  -0.010000   -7.251956   3.003556  -6.211488
vico/num-   3 H      -0.500000  -0.020000   0.690000    1.211883  -0.557390  -6.885958
vico/num-   4 H       0.500000   0.180000  -0.610000   -1.254797  -3.254516   7.812684

  • Niri Forum:Admin, Forum:Mod, NWChemDeveloper, bureaucrat, sysop
    Profile
    Send PM
Gets Around
Threads 4
Posts 158
Hi,

Thanks for this. I will look into it and get back to you.

Best,
-Niri

niri.govind@pnnl.gov

  • Niri Forum:Admin, Forum:Mod, NWChemDeveloper, bureaucrat, sysop
    Profile
    Send PM
Gets Around
Threads 4
Posts 158
Hi, I have been able to reproduce this with the NWChem 6.5 released version as well as my development build. We didn't see this issue during our development phase, but we also didn't look at very small systems. I will address this issue and post a patch as soon as possible.

Best regards,
-Niri

niri.govind@pnnl.gov


Forum >> NWChem's corner >> Feedback



Who's here now Members 0 Guests 0 Bots/Crawler 1


AWC's: 2.5.10 MediaWiki - Stand Alone Forum Extension
Forum theme style by: AWC