CMIRS / ISOSVP unexpected behavior

Hi John, following up our discussions last year I have recently been working on completing support for ISOSVP and CMIRS in our high-throughput infrastructure code pymatgen (see PR). In the course of doing so I think I stumbled upon another edge case that I wanted to bring to your attention.

First, per our discussion above, apparently GEN_SCFMAN does not support ISOSVP or CMIRS. However, it seems that if I start an ISOSVP or CMIRS calculation with gen_scfman=true, rather than erroring out or falling back to the other SCF algorithm, the calculation will skip the solvent part and otherwise complete normally, with no indication that anything unexpected has happened. In the attached, if you uncomment gen_scfman=true and run the calculation with either IDEFESR=0 or 1, you’ll see what I mean.

Second, I get a failure related to the Lebdev grid points if I request CMIRS (IDEFESR=1) in the example below, but with IDEFESR=0 the calculation works as expected. I know that I have specified a valid number of grid points in NPTLEB, so I don’t understand how to troubleshoot the error. Can you offer any guidance?

This is all with Q-Chem 5.4.2. I haven’t had the opportunity to test with 6.0 yet so apologies if some of this has already been addressed.

Finally, on an unrelated note - the CMIRS and ISOSVP examples in the manual use the PCM_PRINT keyword, but I cannot find that keyword documented in the manual anywhere. I also don’t notice any difference in the output file whether or not I enable it. Do you know what it does?

You are running Q-Chem version: 5.4.2

#
# job setting
#
local host:  n0000.lr6
current dir: /global/home/groups/lr_mp/rkingsbury/test_cmirs
input file:  another_cmirs_test.qin
output file: 
nprocs     : 0
nthreads   : 40
#
# qchem installation setting
#
QC:          /clusterfs/mp/software/qchem5.4
QCAUX:       /clusterfs/mp/software/qchem5.4/qcaux
QCPROG:      /clusterfs/mp/software/qchem5.4/exe/qcprog.exe_s
QCPROG_S:    /clusterfs/mp/software/qchem5.4/exe/qcprog.exe_s
PARALLEL:    -DSERIAL
QCMPI:       MPICH
#
# qchem directory setting
#
qcrun:       qchem291257
QCSCRATCH:   /global/home/groups/lr_mp/rkingsbury/test_cmirs
QCLOCALSCR:  /tmp
QCTMPDIR:    /tmp
QCFILEPREF:  /tmp/qchem291257
QCSAVEDIR:   
workdirs:    /tmp/qchem291257
workdir0:    /tmp/qchem291257
partmpdirs =  
#
# parallel setting
#
QCRSH:           ssh
QCMPI:           mpich
QCMPIRUN:        /clusterfs/mp/software/qchem5.4/bin/mpi/mpirun_qchem
QCMACHINEFILE:   /tmp/qchem291257/hostfile

#
# env setting
#
exported envs:   QC QCAUX QCSCRATCH QCRUNNAME QCFILEPREF QCPROG QCPROG_S GUIFILE

Running Job 1 of 1 another_cmirs_test.qin
qchem another_cmirs_test.qin_291257.0 /tmp/qchem291257/ 0
/clusterfs/mp/software/qchem5.4/exe/qcprog.exe_s another_cmirs_test.qin_291257.0 /tmp/qchem291257/
                  Welcome to Q-Chem
     A Quantum Leap Into The Future Of Chemistry


 Q-Chem 5.4, Q-Chem, Inc., Pleasanton, CA (2021)

 E. Epifanovsky,  A. T. B. Gilbert,  Xintian Feng,  Joonho Lee,  Yuezhi Mao,  
 N. Mardirossian,  P. Pokhilko,  A. White,  M. Wormit,  M. P. Coons,  
 A. L. Dempwolff,  Zhengting Gan,  D. Hait,  P. R. Horn,  L. D. Jacobson,  
 I. Kaliman,  J. Kussmann,  A. W. Lange,  Ka Un Lao,  D. S. Levine,  Jie Liu,  
 S. C. McKenzie,  A. F. Morrison,  K. Nanda,  F. Plasser,  D. R. Rehn,  
 M. L. Vidal,  Zhi-Qiang You,  Ying Zhu,  B. Alam,  B. Albrecht,  
 A. Aldossary,  E. Alguire,  J. H. Andersen,  D. Barton,  K. Begam,  A. Behn,  
 Y. A. Bernard,  E. J. Berquist,  H. Burton,  A. Carreras,  K. Carter-Fenk,  
 Romit Chakraborty,  A. D. Chien,  K. D. Closser,  V. Cofer-Shabica,  
 S. Dasgupta,  Jia Deng,  M. de Wergifosse,  M. Diedenhofen,  Hainam Do,  
 S. Ehlert,  Po-Tung Fang,  S. Fatehi,  Qingguo Feng,  T. Friedhoff,  
 J. Gayvert,  Qinghui Ge,  G. Gidofalvi,  M. Goldey,  J. Gomes,  
 C. Gonzalez-Espinoza,  S. Gulania,  A. Gunina,  M. W. D. Hanson-Heine,  
 P. H. P. Harbach,  A. W. Hauser,  M. F. Herbst,  M. Hernandez Vera,  
 M. Hodecker,  Z. C. Holden,  S. Houck,  Xunkun Huang,  Kerwin Hui,  
 B. C. Huynh,  M. Ivanov,  Hyunjun Ji,  Hanjie Jiang,  B. Kaduk,  S. Kaehler,  
 K. Khistyaev,  Jaehoon Kim,  P. Klunzinger,  Z. Koczor-Benda,  
 Joong Hoon Koh,  D. Kosenkov,  L. Koulias,  T. Kowalczyk,  C. M. Krauter,  
 K. Kue,  A. Kunitsa,  T. Kus,  A. Landau,  K. V. Lawler,  D. Lefrancois,  
 S. Lehtola,  Rain Li,  Yi-Pei Li,  Jiashu Liang,  M. Liebenthal,  
 Hung-Hsuan Lin,  You-Sheng Lin,  Fenglai Liu,  Kuan-Yu Liu,  
 M. Loipersberger,  A. Luenser,  A. Manjanath,  P. Manohar,  E. Mansoor,  
 S. F. Manzer,  Shan-Ping Mao,  A. V. Marenich,  T. Markovich,  S. Mason,  
 S. A. Maurer,  P. F. McLaughlin,  M. F. S. J. Menger,  J.-M. Mewes,  
 S. A. Mewes,  P. Morgante,  J. W. Mullinax,  K. J. Oosterbaan,  G. Paran,  
 Alexander C. Paul,  Suranjan K. Paul,  F. Pavosevic,  Zheng Pei,  S. Prager,  
 E. I. Proynov,  E. Ramos,  B. Rana,  A. E. Rask,  A. Rettig,  R. M. Richard,  
 F. Rob,  E. Rossomme,  T. Scheele,  M. Scheurer,  M. Schneider,  
 N. Sergueev,  S. M. Sharada,  W. Skomorowski,  D. W. Small,  C. J. Stein,  
 Yu-Chuan Su,  E. J. Sundstrom,  Zhen Tao,  J. Thirman,  T. Tsuchimochi,  
 N. M. Tubman,  S. P. Veccham,  O. Vydrov,  J. Wenzel,  J. Witte,  A. Yamada,  
 Kun Yao,  S. Yeganeh,  S. R. Yost,  A. Zech,  Igor Ying Zhang,  Xing Zhang,  
 Yu Zhang,  D. Zuev,  A. Aspuru-Guzik,  A. T. Bell,  N. A. Besley,  
 K. B. Bravaya,  B. R. Brooks,  D. Casanova,  Jeng-Da Chai,  S. Coriani,  
 C. J. Cramer,  A. E. DePrince, III,  R. A. DiStasio Jr.,  A. Dreuw,  
 B. D. Dunietz,  T. R. Furlani,  W. A. Goddard III,  S. Grimme,  
 S. Hammes-Schiffer,  T. Head-Gordon,  W. J. Hehre,  Chao-Ping Hsu,  
 T.-C. Jagau,  Yousung Jung,  A. Klamt,  Jing Kong,  D. S. Lambrecht,  
 WanZhen Liang,  N. J. Mayhall,  C. W. McCurdy,  J. B. Neaton,  T. Neudecker,  
 C. Ochsenfeld,  J. A. Parkhill,  R. Peverati,  V. A. Rassolov,  Yihan Shao,  
 L. V. Slipchenko,  R. P. Steele,  J. E. Subotnik,  A. J. W. Thom,  
 A. Tkatchenko,  D. G. Truhlar,  T. Van Voorhis,  T. A. Wesolowski,  
 K. B. Whaley,  H. L. Woodcock III,  P. M. Zimmerman,  S. Faraji,  
 P. M. W. Gill,  M. Head-Gordon,  J. M. Herbert,  A. I. Krylov

 Additional authors since Version 5.4.0: 
 Chandrima Chakravarty,  L. Cunha,  R. Kang,  Yongbin Kim,  S. Kotaru,  
 Shaozhi Li,  Xiangyuan Li,  F. Matz,  A. Molle,  V. Parravicini,  
 Haisheng Ren,  Hengyuan Shen,  Yingli Su,  Hung-Yi Tsai,  C. Utku,  
 Fang Wang,  Jeff Yang,  F. Zeller

 Contributors to earlier versions of Q-Chem not listed above: 
 R. D. Adamson,  B. Austin,  R. Baer,  J. Baker,  G. J. O. Beran,  
 K. Brandhorst,  S. T. Brown,  E. F. C. Byrd,  Arup K. Chakraborty,  
 G. K. L. Chan,  Chun-Min Chang,  Yunqing Chen,  C.-L. Cheng,  
 Siu Hung Chien,  D. M. Chipman,  D. L. Crittenden,  H. Dachsel,  
 R. J. Doerksen,  A. D. Dutoi,  R. G. Edgar,  J. Fosso-Tande,  
 L. Fusti-Molnar,  D. Ghosh,  A. Ghysels,  A. Golubeva-Zadorozhnaya,  
 J. Gonthier,  M. S. Gordon,  S. R. Gwaltney,  G. Hawkins,  J. E. Herr,  
 A. Heyden,  S. Hirata,  E. G. Hohenstein,  G. Kedziora,  F. J. Keil,  
 C. Kelley,  Jihan Kim,  R. A. King,  R. Z. Khaliullin,  P. P. Korambath,  
 W. Kurlancheek,  A. Laurent,  A. M. Lee,  M. S. Lee,  S. V. Levchenko,  
 Ching Yeh Lin,  D. Liotard,  E. Livshits,  R. C. Lochan,  I. Lotan,  
 L. A. Martinez-Martinez,  P. E. Maslen,  N. Nair,  D. P. O'Neill,  
 D. Neuhauser,  E. Neuscamman,  C. M. Oana,  R. Olivares-Amaya,  R. Olson,  
 T. M. Perrine,  B. Peters,  P. A. Pieniazek,  A. Prociuk,  Y. M. Rhee,  
 J. Ritchie,  M. A. Rohrdanz,  E. Rosta,  N. J. Russ,  H. F. Schaefer III,  
 M. W. Schmidt,  N. E. Schultz,  S. Sharma,  N. Shenvi,  C. D. Sherrill,  
 A. C. Simmonett,  A. Sodt,  T. Stein,  D. Stuck,  K. S. Thanthiriwatte,  
 V. Vanovschi,  L. Vogt,  Tao Wang,  A. Warshel,  M. A. Watson,  
 C. F. Williams,  Q. Wu,  X. Xu,  Jun Yang,  W. Zhang,  Yan Zhao

   Please cite Q-Chem as follows:
  "Software for the frontiers of quantum chemistry:
   An overview of developments in the Q-Chem 5 package"
   J. Chem. Phys. 155, 084801 (2021)
   https://doi.org/10.1063/5.0055522 (open access)

 Q-Chem 5.4.2 for Intel X86 EM64T Linux

 Parts of Q-Chem use Armadillo 9.900.5 (Nocturnal Misbehaviour).
 http://arma.sourceforge.net/

 Q-Chem begins on Fri Nov  4 17:15:08 2022  

 Host: 
0

     Scratch files written to /tmp/qchem291257//
 Dec1321 |scratch|qcdevops|jenkins|workspace|build_RNUM 7600   
 Processing $rem in /clusterfs/mp/software/qchem5.4/config/preferences:
 Processing $rem in /global/home/users/rkingsbury/.qchemrc:

 Checking the input file for inconsistencies... 	...done.

--------------------------------------------------------------
User input:
--------------------------------------------------------------
$molecule
1 1
Na      0.0000000000      0.0000000000      0.0000000000
O     -1.8001161600     -0.6939001500     -0.9214866500
H     -2.1071897300     -0.3461047000     -1.7624741100
H     -2.4776647800     -1.3191837300     -0.6515744000
O      0.5853183000      1.1109186800     -1.9154818800
H      1.3313160500      1.4519346400     -1.4100670200
H      0.3499727900      1.8152126800     -2.5246057800
O     -0.7772947400      1.7789120100      0.8922203400
H     -1.6763147900      2.1056079700      0.9766872400
H     -0.2387724200      2.4176753600      1.3659506600
O      0.0191537900     -1.2523770200      1.7309394700
H      0.3027036200     -2.1689720100      1.7003239100
H     -0.2719578100     -1.1150486100      2.6362305400
O      1.2718035400     -1.5211563200     -1.1397896900
H      1.3080515500     -2.4116967200     -1.4976410500
H      1.1632019300     -0.9452303500     -1.9044107100
O      2.1518753900      0.6898620600      0.4005289600
H      2.7814587400      0.9137581600      1.0903610600
H      2.4274422000     -0.1740194300      0.0755081500
$end

$rem
job_type = sp
basis = def2-tzvpd
max_scf_cycles = 100
!gen_scfman = true
xc_grid = 3
thresh = 14
s2thresh = 16
scf_algorithm = diis
resp_charges = false
symmetry = false
sym_ignore = true
method = wb97xv
solvent_method = ISOSVP
nbo = true
$end

$nbo
$end

$svp
RHOISO=0.001, NPTLEB=974, ITRNGR=2, IROTGR=2, DIELST=78.39, IDEFESR=1
$end

$pcm_nonels
a -0.006736
b 0.032698
c -1249.6
d -21.405
gamma 3.7
solvrho 0.05
delta 7
gaulag_n 40
$end
--------------------------------------------------------------
 ----------------------------------------------------------------
             Standard Nuclear Orientation (Angstroms)
    I     Atom           X                Y                Z
 ----------------------------------------------------------------
    1      Na      0.0000000000     0.0000000000     0.0000000000
    2      O      -1.8001161600    -0.6939001500    -0.9214866500
    3      H      -2.1071897300    -0.3461047000    -1.7624741100
    4      H      -2.4776647800    -1.3191837300    -0.6515744000
    5      O       0.5853183000     1.1109186800    -1.9154818800
    6      H       1.3313160500     1.4519346400    -1.4100670200
    7      H       0.3499727900     1.8152126800    -2.5246057800
    8      O      -0.7772947400     1.7789120100     0.8922203400
    9      H      -1.6763147900     2.1056079700     0.9766872400
   10      H      -0.2387724200     2.4176753600     1.3659506600
   11      O       0.0191537900    -1.2523770200     1.7309394700
   12      H       0.3027036200    -2.1689720100     1.7003239100
   13      H      -0.2719578100    -1.1150486100     2.6362305400
   14      O       1.2718035400    -1.5211563200    -1.1397896900
   15      H       1.3080515500    -2.4116967200    -1.4976410500
   16      H       1.1632019300    -0.9452303500    -1.9044107100
   17      O       2.1518753900     0.6898620600     0.4005289600
   18      H       2.7814587400     0.9137581600     1.0903610600
   19      H       2.4274422000    -0.1740194300     0.0755081500
 ----------------------------------------------------------------
 Nuclear Repulsion Energy =         438.21202891 hartrees
 There are       35 alpha and       35 beta electrons
 Requested basis set is def2-TZVPD
 There are 157 shells and 383 basis functions

 Total QAlloc Memory Limit  96000 MB
 Mega-Array Size       188 MB
 MEM_STATIC part       192 MB
 A cutoff of  1.0D-16 yielded  11722 shell pairs
 There are     70770 function pairs (     85779 Cartesian)
 Smallest overlap matrix eigenvalue = 6.17E-05

 Scale SEOQF with 1.000000e-01/1.000000e-01/1.000000e-01

 Standard Electronic Orientation quadrupole field applied
 Nucleus-field energy     =    -0.0000000001 hartrees
 Guess from superposition of atomic densities
 Warning:  Energy on first SCF cycle will be non-variational
 SAD guess density has 71.000000 electrons
 Long-range K will be added via erf
 Coulomb attenuation parameter = 0.3 bohr**(-1)
 A restricted hybrid HF-DFT SCF calculation will be
 performed using Pulay DIIS extrapolation
 Iso-density SS(V)PE solvation model will be applied
 Exchange:     0.1670 Hartree-Fock + 1.0000 wB97X-V + LR-HF
 Correlation:  1.0000 wB97X-V
 Using SG-3 standard quadrature grid
 Nonlocal Correlation:  VV10 with C = 0.0100 and b = 6.00 and scale = 1.00000
 Grid used for NLC:  SG-1 standard quadrature
 SCF converges when DIIS error is below 1.0E-05
Gas-phase calculation in preparation for subsequent SS(V)PE
 using 40 threads for integral computing
 -------------------------------------------------------
 OpenMP Integral computing Module                
 Release: version 1.0, May 2013, Q-Chem Inc. Pittsburgh 
 -------------------------------------------------------
 -------------------------------------------------------
 OpenMP BLAS3 based DFT computing Module                
 Release: version 1.0, May 2013, Q-Chem Inc. Pittsburgh 
 -------------------------------------------------------
 ---------------------------------------
  Cycle       Energy         DIIS Error
 ---------------------------------------
    1    -620.8632409764      2.25E-02
    2    -620.5244311403      4.52E-03
    3    -620.5741186681      4.45E-03
    4    -620.8029378725      2.27E-04
    5    -620.8036542099      5.63E-05
    6    -620.8037131279      2.33E-05
    7    -620.8037194923      7.87E-06

The Gas Phase SCF has converged
 ---------------------------------------


 Now restarting with SVP Calculation
          --------------
          -SVPE- SOLVENT
          --------------

 ----- NAMELIST $SVP -----
 ISHAPE=   0 ITRCAV=  99 NDRCAV=   0
 INTCAV=   0 NPTLEB= 974 NPTTHE=   8 NPTPHI=  16
 ITRNGR=   2 IROTGR=   2
 LINEQ =   1 IRDRF =   0 IPNRF =   0
 IOPPRD=   0
 IDEFESR=   1

 RHOISO=    0.001000 TOLCAV=  0.1000D-09 RADSPH=    2.645617 TOLCHG=  0.1000D-06
 DIELST=   78.390000 CVGLIN=  0.1000D-06 CSDIAG=    1.104000
 ROTTHE=    0.000000 ROTPHI=    0.000000 ROTCHI=    0.000000
 TRANX =    0.000000 TRANY =    0.000000 TRANZ =    0.000000

 
 Radius =    7.74496378817101     
 Center =            0.3858812313           0.0298631913          -0.2536562639
 
 Rotation Matrix
           0.8483715330           0.1189979629           0.5158538813
           0.0246276560           0.9644838628          -0.2629911726
          -0.5288281579           0.2358184962           0.8153100123
 
 METHOD =            0
 -------------------------------------------------------
 OpenMP BLAS3 based DFT computing Module                
 Release: version 1.0, May 2013, Q-Chem Inc. Pittsburgh 
 -------------------------------------------------------
 -------------------------------------------------------
  Cycle       Energy         DIIS Error    SVP Error
 -------------------------------------------------------
    1    -620.8974994113      1.68E-04      6.80E-03
    2    -620.8991862885      7.37E-05      3.97E-04
    3    -620.8992785708      4.85E-05      4.72E-05
    4    -620.8994516796      8.63E-06      5.95E-05
    5    -620.8994786316      2.24E-06      1.82E-05
    6    -620.8994870746      5.31E-07      4.55E-06
    7    -620.8994882040      2.52E-07      8.36E-07
    8    -620.8994882878      7.91E-08      1.77E-07
    9    -620.8994883491      2.29E-08      6.11E-08 Convergence criterion met
 -------------------------------------------------------


--------------------------------------------------------------------------------
DEFESR calculation with single-center isodensity surface

 Total number of surface points = 0
 Valid Angular Grids are :
 6, 18, 26, 38, 50, 74, 86, 110, 146, 170, 194, 230
 266, 302, 434, 590, 770, 974, 1202, 1454, 1730
 2030, 2354, 2702, 3074, 3470, 3890, 4334, 4802, 5294

 Q-Chem fatal error occurred in module 0, line 2861:

 Unrecognized grid requested in Lebdev

remove work dirs /tmp/qchem291257.0 -- /tmp/qchem291257.-1
rm -rf /tmp/qchem291257

The isodensity version of SS(V)PE is only available in the old SCF code, which is why Q-Chem defaults to GEN_SCFMAN=FALSE in this case. Furthermore, that isodensity implementation is not a PCM so it is not controlled by PCM keywords such as PCM_PRINT. The error that you encounter looks like it may be a bug, because this message:

DEFESR calculation with single-center isodensity surface

 Total number of surface points = 0

suggests that NPTLEB = 0 is somehow getting passed to the code, rather than the requested value of 974. I will have to investigate further when I have some more time, or you can contact Q-Chem support. (It is reproducible in Q-Chem 6.0.1.)

Thanks for those clarifications @jherbert . To be more specific, I think the intended behavior is that Q-Chem defaults to the old SCF code when CMIRS is called, but it appears that does not actually happen. Rather, if I pass gen_scfman=true in the input, Q-Chem skips the solvation calculation altogether. I think it would be better if Q-Chem failed in that case or at least printed some kind of warning.

As for the NPTLEB issue, for the time being I will just disable gen_scfman and see how many of these unusual failures occur.

Finally, I would like to request that the two points you raised be added to the manual. Specifically:

  • That GEN_SCFMAN does not support CMIRS/ISOSVP
  • Explain the function of PCM_PRINT

If it would be helpful to contact Q-Chem support with that request please let me know

SOLVED.

I expanded my testing to about 50 ion-water clusters (in implicit water) and encountered the same behavior for every single one of them - the pure ISOSVP calculation would work (as long as I made sure not to request GEN_SCFMAN), but if I tried to enable CMIRS I would get the error above about Lebdev grids.

After carefully scrutinizing my output I determined that you have to set IPNRF=1 in addition to IDEFESR=1 in order to get CMIRS to work. This is shown in the example in the Q-Chem manual but the IPNRF option is not documented anywhere. Once I set it, the CMIRS calculation works.

So, in addition to the above, I request that documentation for IPNRF be added to the manual. Thanks!

Great. I will make some changes to the manual. Note, however, that ISOSVP is not a PCM so there’s no reason why the PCM_PRINT keyword should control that method.

For the record, these changes have been made for v. 6.0.2: clarifying IPNRF in the manual, and stopping the job if SOLVENT_METHOD = ISOSVP the user tries to force GEN_SCFMAN = TRUE.

Awesome, I (and future users) thank you!