gms-bbg / gamess-issues

GAMESS issue tracking
7 stars 1 forks source link

DFT analytic hessian goes to TDDFT bug #37

Closed shoubhikraj closed 2 years ago

shoubhikraj commented 3 years ago
 $BASIS GBASIS=STO NGAUSS=3 $END
 $CONTRL SCFTYP=RHF RUNTYP=HESSIAN TDDFT=NONE $END
 $DFT DFTTYP=wB97X-D $END
 $SCF DIRSCF=.t. $END
 $SYSTEM MWORDS=40 $END
 $DATA 
Title
C1
C     6.0    -6.48642     1.62990     0.00000
H     1.0    -5.41642     1.62990     0.00000
H     1.0    -6.84308     1.36449    -0.97327
H     1.0    -6.84309     2.60548     0.25678
H     1.0    -6.84309     0.91973     0.71649
 $END

Output:

THIS EXCHANGE FUNCTIONAL IS NOT SUPPORTED FOR TD-DFT,
 IT MAY NOT BE USED FOR TD-DFT EXCITATION ENERGIES.

 EXECUTION OF GAMESS TERMINATED -ABNORMALLY- AT Tue Nov 24 18:16:23 2020

This happens with wB97X and wB97X-D functional. On requesting analytic hessian, the output seems to suggest that TDDFT was requested. Explicitly writing TDDFT=NONE does not work.

On the GAMESS google group, some comments mention that earlier versions of GAMESS (2013) did not show this error, so it's probably a bug in the code.

saromleang commented 2 years ago

Analytic Hessian for DFT was recently implemented and does appear in the version that you are referencing. GAMESS does not appear to have the proper functional derivatives for wB97X-D for an analytic Hessian. What you can do instead is perform a semi-numeric Hessian with wB97X-D by adding the following entry to your input file:

$FORCE METHOD=SEMINUM $END

susilehtola commented 2 years ago

FWIW the new libxc interface might support analytic derivatives for wB97X-D; libxc has up to 4th derivatives for that functional.

shoubhikraj commented 2 years ago

@susilehtola I tried using the libxc interface with wB97X, and GAMESS was able to get the analytic second derivatives. This solves my problem, thanks a lot!

Out of curiosity, does libxc provide analytic 2nd derivatives for meta-GGA functionals like M06-2X too? Those are currently missing in GAMESS, (even from the libxc interface).

foxtran commented 2 years ago

Out of curiosity, does libxc provide analytic 2nd derivatives for meta-GGA functionals like M06-2X too?

Analytic 2nd derivatives for meta-GGA functionals are provided by libxc. But GAMESS can not use them for Hessian. They can be used only for TD-DFT now.

susilehtola commented 2 years ago

@susilehtola I tried using the libxc interface with wB97X, and GAMESS was able to get the analytic second derivatives. This solves my problem, thanks a lot!

Great! wB97X-D is in Libxc as well, but I don't know whether GAMESS picks up the empirical dispersion terms.

Out of curiosity, does libxc provide analytic 2nd derivatives for meta-GGA functionals like M06-2X too? Those are currently missing in GAMESS, (even from the libxc interface).

Yes, in fact libxc has analytic 4th derivatives for all functionals (barring one or two exceptions) so you can even do analytic TDDFT Hessians with this functionality; support for them is just only available in few codes.

jhliTCB commented 2 months ago

@susilehtola I tried using the libxc interface with wB97X, and GAMESS was able to get the analytic second derivatives. This solves my problem, thanks a lot!

Hi, I also tried the libxc interface for the analytic gradient calculation for the saddle point optimization using wb97x, however, after the first calculation of hessian when the program is trying to search geometries, the log file returns some error like "forrtl: severe (67): input statement requires too much data, unit 22". Here is the input file:

! ts search ! $CONTRL SCFTYP=RHF MAXIT=200 RUNTYP=SADPOINT COORD=UNIQUE MULT=1 ICHARG=-1
DFTTYP=USELIBXC MOLPLT=.T. PLTORB=.FALSE. $END $SYSTEM MWORDS=2000 $END $FORCE METHOD=ANALYTIC $END $STATPT OPTTOL=0.0005 NSTEP=999 $END $STATPT IHREP=10 HSSEND=.TRUE. HESS=CALC $END

$DFT METHOD=GRID NLEB=590 $END

$BASIS GBASIS=N31 NGAUSS=6 NDFUNC=1 NPFUNC=1 $END

$PCM SOLVNT=H2O SMD=.T. $END

$SCF DIRSCF=.T. $END $GUESS GUESS=HUCKEL $END $LIBXC FUNCTIONAL=WB97X $END

$DATA ts search Cnv 3

C 6.0 0.000 -0.000 -0.833 Br 35.0 -0.000 0.000 1.585 Cl 17.0 0.000 -0.000 -3.216 H 1.0 -1.074 0.000 -0.869 $END

Changing the RUNTYP to HESSIAN, the calculation can be ended noramlly, with the total wall clock time=84.5s. (16 CPUs) So, I tried the hessian calculation again using the seminum method, the total wall clock time=139.2s (16 CPUs)

The first 5 FREQs are: ANALYTIC: 455.89 I 0.02 0.03 0.39 12.91 SEMINUM: 504.50 I 128.01 12.52 12.37 0.05

But the error of "asking too much data" really drives me crazy, is it because I did not correctly set up the intel MPI environment?

jhliTCB commented 2 months ago

@susilehtola I tried using the libxc interface with wB97X, and GAMESS was able to get the analytic second derivatives. This solves my problem, thanks a lot!

Hi, I also tried the libxc interface for the analytic gradient calculation for the saddle point optimization using wb97x, however, after the first calculation of hessian when the program is trying to search geometries, the log file returns some error like "forrtl: severe (67): input statement requires too much data, unit 22". Here is the input file:

! ts search ! $CONTRL SCFTYP=RHF MAXIT=200 RUNTYP=SADPOINT COORD=UNIQUE MULT=1 ICHARG=-1
DFTTYP=USELIBXC MOLPLT=.T. PLTORB=.FALSE. $END $SYSTEM MWORDS=2000 $END $FORCE METHOD=ANALYTIC $END $STATPT OPTTOL=0.0005 NSTEP=999 $END $STATPT IHREP=10 HSSEND=.TRUE. HESS=CALC $END

$DFT METHOD=GRID NLEB=590 $END

$BASIS GBASIS=N31 NGAUSS=6 NDFUNC=1 NPFUNC=1 $END

$PCM SOLVNT=H2O SMD=.T. $END

$SCF DIRSCF=.T. $END $GUESS GUESS=HUCKEL $END $LIBXC FUNCTIONAL=WB97X $END

$DATA ts search Cnv 3

C 6.0 0.000 -0.000 -0.833 Br 35.0 -0.000 0.000 1.585 Cl 17.0 0.000 -0.000 -3.216 H 1.0 -1.074 0.000 -0.869 $END

Changing the RUNTYP to HESSIAN, the calculation can be ended noramlly, with the total wall clock time=84.5s. (16 CPUs) So, I tried the hessian calculation again using the seminum method, the total wall clock time=139.2s (16 CPUs)

The first 5 FREQs are: ANALYTIC: 455.89 I 0.02 0.03 0.39 12.91 SEMINUM: 504.50 I 128.01 12.52 12.37 0.05

But the error of "asking too much data" really drives me crazy, is it because I did not correctly set up the intel MPI environment?